当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'UserInfomation' 中的标识列插入显式值 返回
SqlSugar
老数据
3
4224
悬赏:5 飞吻
这种错误怎么整?我看了下错误,好像是主键输入为0导致的,
热忱回答(3)
-
ì.2.ろ VIP0
2017/11/20楼主怎么解决的?
0 回复 -
大番茄 VIP0
2020/2/19同问。怎么解决的
0 回复 -
大番茄 VIP0
2020/2/19@大番茄:
问了群里的大佬解决了,为了方便大家。我把解决方法写出来。标识为自增列
[SugarColumn(IsPrimaryKey = true,IsIdentity =true)]
public int id { get; set; }0 回复