error occurred while updating the object context
first of all here is the message The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship. the problem happens when i try to insert new data in the entityframework My entity model in the database i set the relation to cascade on delete and update. that is the only change