Error:A referential integrity constraint violation occurred on db.SaveChanges() in .net?
问题 I have a created a WPF application with Entity framework 4.0. When i am trying to insert record in PhoneNumber Table it inserts first record successfully. But, when i loop through some List and try to insert another item into PhoneNumber table it Insert the record but shows error as: InvalidOperationException was handled by user code: The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent