EF生成的查询,如下,
P1和P4,EF正在选择相同的最新值而不是之前存储的值来与之比较。
UPDATE [XYZ] SET [c] = @p0, [time] = @p1
WHERE [a] = @p2 AND [b] = @p3 AND [time] = @p4;
SELECT @@ROWCOUNT;
',N'@p2 varchar(10),@p3 int,@p0 varchar(8000),@p1 datetime,@p4 datetime',
@p2='1234',
@p3=55,
@p0='Test Update',
@p1='2017-11-29 18:25:18.010',
@p4='2017-11-29 18:25:18.010'
----------------------------
public partial class xyz
{
public string a{ get; set; }
public int b{ get; set; }
public string c{ get; set; }
[ConcurrencyCheck]
public DateTime time{ get; set; }
}