From 074f9ca92dfba401aa2bc6402b8e01d9132aeae6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 2 Dec 2023 02:40:22 +0800 Subject: [PATCH] Update demo --- Src/Asp.NetCore2/MySqlTest/9_Update.cs | 2 +- Src/Asp.NetCore2/PgSqlTest/9_Update.cs | 2 +- Src/Asp.NetCore2/SqlSeverTest/9_Update.cs | 2 +- Src/Asp.NetCore2/SqliteTest/9_Update.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Asp.NetCore2/MySqlTest/9_Update.cs b/Src/Asp.NetCore2/MySqlTest/9_Update.cs index 2fdcc0fdf..c2a078331 100644 --- a/Src/Asp.NetCore2/MySqlTest/9_Update.cs +++ b/Src/Asp.NetCore2/MySqlTest/9_Update.cs @@ -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(); diff --git a/Src/Asp.NetCore2/PgSqlTest/9_Update.cs b/Src/Asp.NetCore2/PgSqlTest/9_Update.cs index 2fdcc0fdf..ab3e9f2b5 100644 --- a/Src/Asp.NetCore2/PgSqlTest/9_Update.cs +++ b/Src/Asp.NetCore2/PgSqlTest/9_Update.cs @@ -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(); diff --git a/Src/Asp.NetCore2/SqlSeverTest/9_Update.cs b/Src/Asp.NetCore2/SqlSeverTest/9_Update.cs index 2fdcc0fdf..dc4d0349e 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/9_Update.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/9_Update.cs @@ -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(); diff --git a/Src/Asp.NetCore2/SqliteTest/9_Update.cs b/Src/Asp.NetCore2/SqliteTest/9_Update.cs index 2fdcc0fdf..ab3e9f2b5 100644 --- a/Src/Asp.NetCore2/SqliteTest/9_Update.cs +++ b/Src/Asp.NetCore2/SqliteTest/9_Update.cs @@ -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();