2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-13 14:38:43 +00:00
This commit is contained in:
2026-05-24 18:27:22 +03:00
parent a6e8bed31d
commit eb323e8bf8
69 changed files with 6532 additions and 3371 deletions
@@ -131,7 +131,7 @@ public static class EsiurExtensions
var id = store.TypesByType[typeof(T)].PrimaryKey.GetValue(resource);
await options.Warehouse.Put($"{store.Instance.Name}/{typeof(T).Name}/{id}", res, 0, manager);
await options.Warehouse.Put($"{store.Instance.Name}/{typeof(T).Name}/{id}", res, new ResourceContext(0, null, null, manager));
return (T)res;
}
@@ -69,9 +69,9 @@ public class EsiurProxyRewrite : IModelFinalizingConvention
if (Codec.ImplementsInterface(entityType.ClrType, typeof(IResource)))
{
// check if the object exists
var obj = options.Warehouse.Create(entityType.ClrType) as IResource;
var obj = options.Warehouse.Create(entityType.ClrType, null) as IResource;
options.Store.TypesByType[entityType.ClrType].PrimaryKey.SetValue(obj, id);
options.Warehouse.Put($"{options.Store.Instance.Name}/{entityType.ClrType.Name}/{id}", obj, 0, manager).Wait();
options.Warehouse.Put($"{options.Store.Instance.Name}/{entityType.ClrType.Name}/{id}", obj, new ResourceContext(0, null, null, manager)).Wait();
return obj;
}
else