From 1178dbebc465bb6beb22f09f7156e110eecd72b8 Mon Sep 17 00:00:00 2001 From: AlexLEWIS Date: Wed, 11 Aug 2021 11:39:49 +0800 Subject: [PATCH] Updated Update Data (markdown) --- Update-Data.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Update-Data.md b/Update-Data.md index bff9137..87baf73 100644 --- a/Update-Data.md +++ b/Update-Data.md @@ -242,7 +242,7 @@ The benefits of using this program for dang complex update: ## Reference -- [《数据库事务》](%e4%ba%8b%e5%8a%a1) +- [《Database Transaction》](Database-Transaction) - [《FreeSql 101, Part 1: Insert Data》](Insert-Data) - [《FreeSql 101, Part 2: Delete Data》](Delete-Data) - [《FreeSql 101, Part 4: Query Data》](Query-Data) @@ -254,19 +254,19 @@ The benefits of using this program for dang complex update: | Methods | Return | Parameters | Description | | - | - | - | - | -| SetSource | \ | T1 \| IEnumerable\ | 更新数据,设置更新的实体 | -| IgnoreColumns | \ | Lambda | 忽略的列 | -| Set | \ | Lambda, value | 设置列的新值,Set(a => a.Name, "newvalue") | -| Set | \ | Lambda | 设置列的的新值为基础上增加,Set(a => a.Clicks + 1),相当于 clicks=clicks+1 | -| SetDto | \ | object | 根据 dto 更新的方法 | -| SetRaw | \ | string, parms | 设置值,自定义SQL语法,SetRaw("title = @title", new { title = "newtitle" }) | -| Where | \ | Lambda | 表达式条件,仅支持实体基础成员(不包含导航对象) | -| Where | \ | string, parms | 原生sql语法条件,Where("id = @id", new { id = 1 }) | -| Where | \ | T1 \| IEnumerable\ | 传入实体或集合,将其主键作为条件 | +| SetSource | \ | T1 \| IEnumerable\ | Update data, set updated entity | +| IgnoreColumns | \ | Lambda | Ignored columns | +| Set | \ | Lambda, value | Set the new value of the column `Set(a => a.Name, "newvalue")` | +| Set | \ | Lambda | Set the new value of the column based on the original value `Set(a => a.Clicks + 1)`, which is equivalent to `clicks=clicks+1` | +| SetDto | \ | object | Update according to DTO | +| SetRaw | \ | string, parms | Set value, custom SQL syntax `SetRaw("title = @title", new {title = "newtitle" })` | +| Where | \ | Lambda | Expression conditions, only support entity members (not including navigation objects) | +| Where | \ | string, parms | Raw SQL syntax conditions `Where("id = @id", new {id = 1 })` | +| Where | \ | T1 \| IEnumerable\ | Pass in the entity or collection, and use its primary key as the condition | | WhereExists | \ | ISelect | 子查询是否存在 | -| CommandTimeout | \ | int | 命令超时设置(秒) | -| WithTransaction | \ | DbTransaction | 设置事务对象 | -| WithConnection | \ | DbConnection | 设置连接对象 | -| ToSql | string | | 返回即将执行的SQL语句 | -| ExecuteAffrows | long | | 执行SQL语句,返回影响的行数 | -| ExecuteUpdated | List\ | | 执行SQL语句,返回更新后的记录 | +| CommandTimeout | \ | int | Command timeout setting (seconds) | +| WithTransaction | \ | DbTransaction | Set transaction object | +| WithConnection | \ | DbConnection | Set the connection object | +| ToSql | string | | Return the SQL statement to be executed | +| ExecuteAffrows | long | | Execute SQL statement and return the number of rows affected | +| ExecuteUpdated | List\ | | Execute SQL statement and return the updated record |