Unable to save new Entities with One-To-Many relation in Entity Framework

c# entity-framework entity-framework-6

Popular Answer

Entity(1) is not yet present in the database at the time you construct Entity2, and Entity2 requires 1 in order to build itself. You did the proper thing by first creating Entity(1) and then using SaveChanges().

0
12/9/2016 6:33:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow