## v0.3.19

- 兼容 GetTableByEntity 有可能因为传入数组类型的错误;
- 修复 UnitOfWork 事务创建逻辑 bug;
- 增加 FreeSql.DbContext 扩展包;
- 调整 UnitOfWork、DbContext 不提交时默认会回滚;
This commit is contained in:
28810
2019-03-20 11:47:04 +08:00
parent 1dccf99bdb
commit 3fd971b78b
21 changed files with 488 additions and 15 deletions

View File

@ -94,7 +94,7 @@ namespace FreeSql {
public Task<int> UpdateAsync(TEntity entity) => OrmUpdate(entity).ExecuteAffrowsAsync();
protected ISelect<TEntity> OrmSelect(object dywhere) {
var select = _fsql.Select<TEntity>(dywhere).WithTransaction(_unitOfWork?.GetOrBeginTransaction());
var select = _fsql.Select<TEntity>(dywhere).WithTransaction(_unitOfWork?.GetOrBeginTransaction(false));
var filters = (DataFilter as DataFilter<TEntity>)._filters.Where(a => a.Value.IsEnabled == true);
foreach (var filter in filters) select.Where(filter.Value.Expression);
return select.AsTable(AsTableSelect);