Thursday, 15 March 2012

Adding two non-relation Entities to DbContext that second entity use the first one's Id entity -


In the first code, when I want to save 2 related entities (for example country unit and city unit), first, Make another example of the country I made and another example of the city, and for the city's navigation, the last Save changelog. Make this process a database, first, create the country and then enter the ID of the country id area of ​​the City ID and the city Save the database. So now, I want to do this but with non-related organizations. This means that I want to send 2 units (without relationship) to DB, in that fist, saved first and get your ID, and use it in past saved ...


No comments:

Post a Comment