4 Commits

Author SHA1 Message Date
28810
8d92ccd751 ## 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;
2019-09-18 16:58:13 +08:00
28810
fa61d8a3d1 - 移除 FreeSql.Repository 扩展方法 FromRepository;
- 调整 ISelect.AsTable 规则,每一次使用将增加 UNION ALL 查询;
- 优化 AsTable UseSyncStructureToLower/ToUpper 设置,兼容 AsTable((t,o) => "(select * from tb)"); #89
2019-09-10 09:26:08 +08:00
28810
fc84f68f3a - 增加 UnitOfWork.Current 静态属性,AsyncLocal 实现 [NETStandard 2.0]; 2019-07-25 16:45:07 +08:00
28810
611c066481 - 合并 FreeSql.DbContext 项目至 FreeSql 维护; 2019-06-26 10:09:26 +08:00