Update demo

This commit is contained in:
sunkaixuan 2023-12-02 02:40:55 +08:00
parent 074f9ca92d
commit 3c0bad8c2d

View File

@ -42,7 +42,7 @@ namespace OrmTest
var result3 = db.Updateable(updateObj).IgnoreColumns(it => new { it.Remark }).ExecuteCommand();
// 更新实体对象的指定列Update specific columns of the entity object
var result4 = db.Updateable(updateObj).UpdateColumns(it => new { it.Name, Date = DateTime.Now }).ExecuteCommand();
var result4 = db.Updateable(updateObj).UpdateColumns(it => new { it.Name, it.Date }).ExecuteCommand();
// 如果没有主键按照指定列更新实体对象If there is no primary key, update entity object based on specified columns
var result5 = db.Updateable(updateObj).WhereColumns(it => new { it.Id }).ExecuteCommand();