阅读背景:

.NET实体框架使用增量主键添加新行

来源:互联网 

I have a table in a SQL Server database which I want to add a row to. The primary key is not auto increment and I don't want it to be. However, on this occassion, I do want to add a row with the next available value. Is there a simple way to do this? I know I could query the table for the max value and then increment it but is there an easier way when using EF?I have a table in a SQL Server database which I




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: