update

28810
2020-05-22 18:18:52 +08:00
parent 5034eda286
commit e940d1254d
2 changed files with 9 additions and 0 deletions

@@ -102,6 +102,14 @@ repo.Update(item); //对比快照时的变化
```
方法2(原始)
```csharp
//v1.5.0 忽略更新 null 值的属性
fsql.Update<Topic>()
.SetSourceIgnore(item)
.ExecuteAffrows();
```
```csharp
var item = new Topic { Id = 1, Title = "newtitle" };
fsql.Update<Topic>()

@@ -15,6 +15,7 @@
- 增加 WhereCascade/GlobalFilter 表达式子查询的支持;
- 增加 \[Description\] 元数据注释,优先级低于 c# 代码注释;
- 增加 IUpdate.SetIf 方法;
- 增加 IUpdate.SetSourceIgnore 方法,可实现忽略 null 属性的更新;
- 增加 FreeSqlBuilder.UseExitAutoDisposePool 方法;
- 优化 Guid GetDefaultValue 可能导致的错误;
- 调整 BaseEntity移除 BaseTreeEntity、Tenant 租户,改变事务习惯 [wiki](https://github.com/2881099/FreeSql/tree/master/Examples/base_entity)