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