Persisting disconnected POCO entities
问题 I'm working with disconnected POCO objects. When I persist a single object, it works fine! The problem starts when I want to persist related objects. For example: Retrieving object from Data layer: using (MyContext ctx = new MyContext ()) { return ctx.Users.First(); } This object goes back to Business layer and there, I add some child records, see below (just to ilustrate): objectUser.Permissions.Add(new Permission()); objectUser.Permissions.Add(new Permission()); Permissions is a navigation