2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 12:43:17 +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

@@ -69,11 +69,10 @@ public class EsiurProxyRewrite : IModelFinalizingConvention
if (Codec.ImplementsInterface(entityType.ClrType, typeof(IResource)))
{
// check if the object exists
var obj = Warehouse.New(entityType.ClrType).Wait() as IResource;
var obj = options.Warehouse.CreateInstance(entityType.ClrType) as IResource;
options.Store.TypesByType[entityType.ClrType].PrimaryKey.SetValue(obj, id);
Warehouse.Put(id.ToString(), obj, options.Store, null, null, 0, manager).Wait();
options.Warehouse.Put(id.ToString(), obj, options.Store, null, 0, manager).Wait();
return obj;
}
else
{