mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-03-28 00:40:58 +08:00
Merge branch 'master' of https://github.com/2881099/FreeSql.wiki
12
修改.md
12
修改.md
@@ -182,15 +182,15 @@ fsql.Update<T>()
|
||||
.ExecuteAffrows();
|
||||
```
|
||||
|
||||
## 6、列优先级
|
||||
## 6、Set/SetSource/SetDto 区别
|
||||
|
||||
```csharp
|
||||
全部列(SetSource) < 指定列(UpdateColumns) < 忽略列(IgnoreColumns) < 指定列(Set/SetRaw)
|
||||
```
|
||||
他们三个是平级功能,分别对应:
|
||||
|
||||
使用 Set/SetRaw 只有指定的列会保存;
|
||||
- Set/SetRaw 在知道实体的时候使用,对应 update t set x = x
|
||||
|
||||
使用 SetSource 实体所有列将被保存,可以通过 UpdateColumns/IgnoreColumns 设置更新/忽略的列;
|
||||
- SetSource 更新整个实体,可以配合 UpdateColumns/IgnoreColumns 指定或忽略字段
|
||||
|
||||
- SetDto 是 Set 的批量操作
|
||||
|
||||
## 7、乐观锁
|
||||
|
||||
|
||||
Reference in New Issue
Block a user