Showing posts with label ef7. Show all posts
Showing posts with label ef7. Show all posts

Thursday, October 1, 2015

System.Data.SqlClient.SqlException
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_*". The conflict occurred in database "aspnet*", table "dbo.*", column '*ID'.

Uh oh... Not sure what this means?  This one is pretty easy. It means your referenced table doesn't have a corresponding row with a matching key.

Fix: Either manually add a row via SQL Server Management Studio or add a row via code.