If I have Book object which has a child collection of Comments, Can I update the Book and list of Comments together with entity framework?
I have tried :
_context.Books.Attach(book);
_context.ObjectStateManager.ChangeObjectState(book, EntityState.Modified);
_context.SaveChanges();
with no luck...
getting the following error on the first line:
An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key