heyoka955
Remove-Migration and Add Migration not correctly working how i expected
When I remove the latest Migration and then add later a migration then changes from previus migrations is also added in the new migration altough i just deleted the latest migration.
This is a behaviour which i want to avoid, what can i do to avoid such side effects?
5 replies
Why does Ef Core not save my data in the database?
I have four models that are saved in sql server with Ef-Core and these four are Order, Contact, Address and BillingInfo.
Each Order has Contact and BillingInfo.
Each Contact has an Address.
Each BillingInfo has an Andress, too.
The problem is whenever i try to save it in the database i receive an error like this:
{"The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_WSOrderAddresses_WebshopBillingInfoPocos_WebshopBillingInfoPocoID\". The conflict occurred in database \"DatabaseService_Name\", table \"dbo.WebshopBillingInfoPocos\", column 'Id'.\r\nThe statement has been terminated."}
and this is my code:
25 replies