I have a C # project on a relatively advanced level.
My DB already contains some data for testing.
I am using entity framework code first migrations
I have the Users and Images tables. The images table has only the Id and ImagePath columns.
I want my Users table to access the Images table so I created a foreign key that is the ImageID (primary key of the Images table).
The problem arises when I type the Update-database command, here is the error:
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_dbo.AspNetUsers_dbo.ImageImageId". The conflict occurred in database "aspnet-BrainCast-20161008051801", table "dbo.Images", column 'Id'.
There is a conflict even though the table images do not contain any data.
Someone has an idea how I can solve this. I've been researching but I do not understand the solutions that are presented, they can also indicate tutorials.