mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Add demo
This commit is contained in:
parent
2c9fa0fdfa
commit
0a18eb18f1
@ -64,7 +64,16 @@ namespace OrmTest
|
|||||||
.PublicSetColumns(it => it.Price, it => it.Price + 1)
|
.PublicSetColumns(it => it.Price, it => it.Price + 1)
|
||||||
.ExecuteCommand();
|
.ExecuteCommand();
|
||||||
|
|
||||||
|
var list = db.Queryable<Order>().OrderBy(it => it.Id).Take(2).ToList();
|
||||||
|
if (list.Count >= 2)
|
||||||
|
{
|
||||||
|
list[0].Price = 10;
|
||||||
|
list[1].Price = 2;
|
||||||
|
var result69 =
|
||||||
|
db.Updateable(list)
|
||||||
|
.PublicSetColumns(it => it.Price, "+")
|
||||||
|
.ExecuteCommand();
|
||||||
|
}
|
||||||
/*** 2.by expression ***/
|
/*** 2.by expression ***/
|
||||||
|
|
||||||
//update name,createtime
|
//update name,createtime
|
||||||
|
Loading…
Reference in New Issue
Block a user