How to insert graph in Entity Framework with circular dependency
问题 This is how database structure looks like: Vehicle has lot of CanNetworks and each CanNetwork has lot of ECUs . And that would save perfectly if that was only I have. But, each vehicle also has one special ECU called gatewayECU so problem happens with saving because entity framework core does not know how to handle that scenario. It needs to insert vehicle before inserting ecus, but how to insert vehicle when ecu is not inserted. This is what I tried: ignore (delete, invalidate) gatewayecu