Setting a Default Value for Migrations
I have a relationship between two models but the relationship is not required, i.e. the first model which "belongs to" the other model can exists on its own.
So in essence, class
I am getting this when trying to run the database update command for the seed data which has set the OwnerId to 0
So in essence, class
Item can stand on its own but it can also belong to someone. I am getting this when trying to run the database update command for the seed data which has set the OwnerId to 0
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Items_Owners_OwnerId". The conflict occurred in database "<DB>", table "dbo.Owners", column 'Id'.