Entity Framework inserting child objects in the wrong order
问题 Question Why is EF first inserting a child object (PersonnelWorkRecord) with a dependency, before the object that it is depended on (TimesheetActivity). Also what are my options on correcting this? ERD (simplified) This is predefined by another system out of my direct control. EF setup and save code I am not sure I understand why/how Entity Framework is inserting the objects I have in the order it does however here is the code I am using to insert a parent and several children. using (var db