2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-12-15 17:20:24 +00:00
This commit is contained in:
2025-12-01 10:22:07 +03:00
parent 7c7ce9acb9
commit fadac3bd30

View File

@@ -67,10 +67,9 @@ public class EntityStore : IStore
// Get db // Get db
using (var db = Getter()) using (var db = Getter())
{ {
var res = db.Find(ti.Type.ClrType, id) as IResource; var res = db.Find(ti.Type.ClrType, id) as IResource;
if (res == null) if (res == null)
{ {
return new AsyncReply<IResource>(null); return new AsyncReply<IResource>(null);
@@ -84,7 +83,7 @@ public class EntityStore : IStore
// load navigation properties // load navigation properties
var ent = db.Entry(res); var ent = db.Entry(res);
foreach (var rf in ent.References) foreach (var rf in ent.References)
{ {
rf.Load(); rf.Load();
@@ -95,6 +94,8 @@ public class EntityStore : IStore
col.Load(); col.Load();
} }
//ent.State = EntityState.Detached;
//var refs = ent.References.ToList(); //var refs = ent.References.ToList();
db.Dispose(); db.Dispose();