mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Update Demo
This commit is contained in:
@@ -69,6 +69,11 @@ namespace OrmTest.Demo
|
|||||||
|
|
||||||
//update one columns
|
//update one columns
|
||||||
var count2 = db.Updateable<Student>().UpdateColumns(it => it.SchoolId == it.SchoolId+1).Where(it => it.Id == it.Id + 1).ExecuteCommand();
|
var count2 = db.Updateable<Student>().UpdateColumns(it => it.SchoolId == it.SchoolId+1).Where(it => it.Id == it.Id + 1).ExecuteCommand();
|
||||||
|
|
||||||
|
var dt = new Dictionary<string, object>();
|
||||||
|
dt.Add("id", 1);
|
||||||
|
dt.Add("name", "1");
|
||||||
|
var t66 = db.Updateable(dt).AS("student").With(SqlWith.UpdLock).ExecuteCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user