mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-15 04:40:55 +08:00
update
15
更新日志.md
15
更新日志.md
@@ -1,6 +1,21 @@
|
||||
|
||||
完整版本:年数-月-日-当日版本号,FreeSql、FreeSql.Repository、FreeSql.DbContext 版本号相同。
|
||||
|
||||
## v0.9.16
|
||||
|
||||
- 增加 BaseRepository.AttachOnlyPrimary 方法,只附加实体的主键值;
|
||||
> 在更新前使用可实现不查询数据库再更新、也可以实现更新时不更新值为 null 的字段
|
||||
```csharp
|
||||
class T {
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string other { get; set; }
|
||||
}
|
||||
var item = new T { id = 1, name = "xx" };
|
||||
fsql.GetRepository<T>().AttachOnlyPrimary(item).Update(item); //只更新 name
|
||||
```
|
||||
- 修复 Lambda 表达式中 DateTime.Now.ToString("yyyyMMdd") 不能直接执行的 bug;
|
||||
|
||||
## v0.9.15
|
||||
|
||||
- 增加 FreeSql.Extensions.JsonMap 扩展包,实现快速将对象映射为json字符串的方法;
|
||||
|
||||
Reference in New Issue
Block a user