2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 20:43:19 +00:00
This commit is contained in:
2025-08-24 02:11:50 +03:00
parent 0d4ea04ef4
commit b12939e109
8 changed files with 149 additions and 79 deletions

View File

@@ -38,7 +38,8 @@ namespace Esiur.Stores.MongoDB
[Export]
public async AsyncReply<T> New(string name = null, object properties = null)
{
var resource = await Warehouse.New<T>(name, this, null, null, null, properties);
var resource = Instance.Warehouse.CreateInstance<T>(properties);
await Instance.Warehouse.Put(name, resource, this, null, 0);
resource.Instance.Managers.AddRange(this.Instance.Managers.ToArray());
return resource;
}