mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update demo
This commit is contained in:
parent
67356d440d
commit
f29735ffdd
@ -59,11 +59,18 @@ namespace OrmTest
|
|||||||
|
|
||||||
|
|
||||||
//Update by track
|
//Update by track
|
||||||
|
Console.WriteLine(" Tracking 1:");
|
||||||
db.Tracking(updateObj);
|
db.Tracking(updateObj);
|
||||||
|
//Update set name
|
||||||
updateObj.Name = "a1" + Guid.NewGuid();
|
updateObj.Name = "a1" + Guid.NewGuid();
|
||||||
db.Updateable(updateObj).ExecuteCommand();
|
db.Updateable(updateObj).ExecuteCommand();
|
||||||
db.TempItems = null;
|
db.TempItems = null;
|
||||||
|
|
||||||
|
Console.WriteLine(" Tracking 2:");
|
||||||
|
db.Tracking(updateObj);
|
||||||
|
//No Update
|
||||||
|
db.Updateable(updateObj).ExecuteCommand();
|
||||||
|
db.TempItems = null;
|
||||||
|
|
||||||
/*** 2.by expression ***/
|
/*** 2.by expression ***/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user