I am trying to perform an insertion of a new entity by means of Entity Framework
C#
in a table with auto-generated Id, but when calling the method SaveChanges()
I receive the following error:
A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column:
Id
.
Reviewing in Database, it is correctly defined as auto-numeric and in .edmx
it appears as PK
.
Any idea where the error may be?