Update demo

This commit is contained in:
sunkaixuan 2023-12-02 02:40:22 +08:00
parent de70c9d20d
commit 074f9ca92d
4 changed files with 4 additions and 4 deletions

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();

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();

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();

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();