2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2020-02-26 03:14:22 +03:00
parent 7a21f6a928
commit fde1b1d8ad
39 changed files with 1108 additions and 502 deletions

View File

@ -35,13 +35,15 @@ namespace Esyur.Stores.MongoDB
{
public class MongoDBStore<T> : MongoDBStore where T:IResource
{
[ResourceFunction]
public T Create(string name, Structure values)
[Public]
public T New(string name = null, object properties = null)
{
return Warehouse.New<T>(name, this, null, null, null, null, values);
var resource = Warehouse.New<T>(name, this, null, null, null, properties);
resource.Instance.Managers.AddRange(this.Instance.Managers.ToArray());
return resource;
}
[ResourceFunction]
[Public]
public async AsyncReply<IResource[]> Slice(int index, int limit)
{
var list = await this.Instance.Children<IResource>();