mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-09-13 12:43:17 +00:00
Store
This commit is contained in:
@@ -103,7 +103,7 @@ public class EntityStore : IStore
|
||||
}
|
||||
}
|
||||
|
||||
public AsyncReply<bool> Put(IResource resource)
|
||||
public AsyncReply<bool> Put(IResource resource, string path)
|
||||
{
|
||||
if (resource == this)
|
||||
return new AsyncReply<bool>(true);
|
||||
|
@@ -131,7 +131,7 @@ public static class EsiurExtensions
|
||||
|
||||
var id = store.TypesByType[typeof(T)].PrimaryKey.GetValue(resource);
|
||||
|
||||
await options.Warehouse.Put(id.ToString(), res, store, null, 0, manager);
|
||||
await options.Warehouse.Put($"{store.Instance.Name}/{typeof(T).Name}/{id}", res, null, 0, manager);
|
||||
|
||||
return (T)res;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ public class EsiurProxyRewrite : IModelFinalizingConvention
|
||||
// check if the object exists
|
||||
var obj = options.Warehouse.Create(entityType.ClrType) as IResource;
|
||||
options.Store.TypesByType[entityType.ClrType].PrimaryKey.SetValue(obj, id);
|
||||
options.Warehouse.Put(id.ToString(), obj, options.Store, null, 0, manager).Wait();
|
||||
options.Warehouse.Put($"{options.Store.Instance.Name}/{entityType.ClrType.Name}/{id}", obj, null, 0, manager).Wait();
|
||||
return obj;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user