ADO.NET Entity Framework and identity columns

前端 未结 10 1474
甜味超标
甜味超标 2020-12-29 18:06

Is the Entity Framework aware of identity columns?

I am using SQL Server 2005 Express Edition and have several tables where the primary key is an identity column. w

10条回答
  •  时光说笑
    2020-12-29 18:25

    You should set the identity columns' identity specification so that the (Is Identity) property is set to true. You can do this in your table designer in SSMS. Then you may need to update the entity data model.

    Perhaps that what you mean by saying the "Primary key is an identity column," or perhaps you missed this step.

提交回复
热议问题