On updating database in Entity Framework , Code first Migration, I am getting this error:
The ALTER TABLE statement conflicted with the FOREIGN KEY constr
Run the Add-Migration InitialCreate –IgnoreChanges command in Package Manager Console. This creates an empty migration with the current model as a snapshot.
Run the Update-Database command in Package Manager Console. This will apply the InitialCreate migration to the database. Since the actual migration doesn’t contain any changes, it will simply add a row to the __MigrationsHistory table indicating that this migration has already been applied.
You can get more detail here : https://msdn.microsoft.com/en-us/library/dn579398(v=vs.113).aspx