C#, entity framework, auto increment

Check in your EDMX model, that the autoincrement field’s StoreGeneratedPattern attribute is set to “Identity”. In this way, EF knows that the autonumbers are handled by the DB.

Here this is explained better: Autonumber with Entity Framework

Leave a Comment