UPDATE 开发者_JAVA技巧 Scenarios.Blocks
SET OrderId = OrderId - 1
So, it's basically updating a column with its current value minus one.
This should help:
db.Update<Blocks>.Set(x => x.OrderId == x.OrderId - 1).Execute();
If you want to have a where clause for your update query: Subsonic 3.0 UPDATE, multiple conditions
精彩评论