1
I have a project in c# in a relatively advanced phase.
My comic book already contains some test data.
I am using code first Migrations from Entity Framework
I have the Users and Images tables. The images table has only the Id and Path Columns.
I want my Users table to access the Images table so I created a foreign key that is Iddaimagem (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.Imagems_imagemid". The Conflict occurred in database "aspnet-Braincast-20161008051801", table "dbo.Imagems", column 'Id'.
There is a conflict even if the table images does not contain any data.
Someone has an idea of how I can solve this. I have been researching but do not understand the solutions that are presented, can also indicate tutorials.
can put your most important code, please?
– ZelDias