mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Add demo
This commit is contained in:
@@ -55,6 +55,16 @@ namespace OrmTest
|
||||
var result6 = db.Updateable(updateObjs).WhereColumns(it => new { it.Id }).ExecuteCommand();//update List<Class> by id
|
||||
|
||||
|
||||
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 ***/
|
||||
|
Reference in New Issue
Block a user