0
在SubSonic3中可以这样做吗?SubSonic3更新问题
_db.Update<Product>()
.Set("UnitPrice")
.EqualTo(UnitPrice + 5)
.Where<Product>(x=>x.ProductID==5)
.Execute();
我需要的东西,这LIK:
UPDATE Blocks
SET OrderId = OrderId - 1
WHERE ComponentId = 3
但SubSonic3
TITAN,这是不是真的做我想要的。例如,我想设置一个等于当前值-1的值。在你的榜样,你只是将所有记录虚假和100 ... – 2010-02-23 14:19:56
_db.Update() .SET( X => x.UnitPrice == x.UnitPrice + 5) 。凡(X => x.ProductID == 5) .Execute(); –
2010-02-24 05:23:09
不,不起作用。 Set不接受Lambda表达式。 – 2010-02-24 09:16:59