Updated Update Data (markdown)

AlexLEWIS
2021-08-11 11:39:49 +08:00
parent ef340d4ab1
commit 1178dbebc4

@@ -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 | \<this\> | T1 \| IEnumerable\<T1\> | 更新数据,设置更新的实体 |
| IgnoreColumns | \<this\> | Lambda | 忽略的列 |
| Set | \<this\> | Lambda, value | 设置列的新值,Set(a => a.Name, "newvalue") |
| Set | \<this\> | Lambda | 设置列的的新值为基础上增加Set(a => a.Clicks + 1),相当于 clicks=clicks+1 |
| SetDto | \<this\> | object | 根据 dto 更新的方法 |
| SetRaw | \<this\> | string, parms | 设置值自定义SQL语法SetRaw("title = @title", new { title = "newtitle" }) |
| Where | \<this\> | Lambda | 表达式条件,仅支持实体基础成员(不包含导航对象) |
| Where | \<this\> | string, parms | 原生sql语法条件Where("id = @id", new { id = 1 }) |
| Where | \<this\> | T1 \| IEnumerable\<T1\> | 传入实体或集合,将其主键作为条件 |
| SetSource | \<this\> | T1 \| IEnumerable\<T1\> | Update data, set updated entity |
| IgnoreColumns | \<this\> | Lambda | Ignored columns |
| Set | \<this\> | Lambda, value | Set the new value of the column `Set(a => a.Name, "newvalue")` |
| Set | \<this\> | 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 | \<this\> | object | Update according to DTO |
| SetRaw | \<this\> | string, parms | Set value, custom SQL syntax `SetRaw("title = @title", new {title = "newtitle" })` |
| Where | \<this\> | Lambda | Expression conditions, only support entity members (not including navigation objects) |
| Where | \<this\> | string, parms | Raw SQL syntax conditions `Where("id = @id", new {id = 1 })` |
| Where | \<this\> | T1 \| IEnumerable\<T1\> | Pass in the entity or collection, and use its primary key as the condition |
| WhereExists | \<this\> | ISelect | 子查询是否存在 |
| CommandTimeout | \<this\> | int | 命令超时设置(秒) |
| WithTransaction | \<this\> | DbTransaction | 设置事务对象 |
| WithConnection | \<this\> | DbConnection | 设置连接对象 |
| ToSql | string | | 返回即将执行的SQL语句 |
| ExecuteAffrows | long | | 执行SQL语句返回影响的行数 |
| ExecuteUpdated | List\<T1\> | | 执行SQL语句返回更新后的记录 |
| CommandTimeout | \<this\> | int | Command timeout setting (seconds) |
| WithTransaction | \<this\> | DbTransaction | Set transaction object |
| WithConnection | \<this\> | 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\<T1\> | | Execute SQL statement and return the updated record |