mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 BaseRepository.UnitOfWork 延迟设置无效的 bug;
This commit is contained in:
@ -63,7 +63,16 @@ namespace FreeSql
|
||||
public DbContextOptions DbContextOptions { get => _db.Options; set => _db.Options = value; }
|
||||
|
||||
public IFreeSql Orm { get; private set; }
|
||||
public IUnitOfWork UnitOfWork { get; set; }
|
||||
IUnitOfWork _unitOfWork;
|
||||
public IUnitOfWork UnitOfWork
|
||||
{
|
||||
set
|
||||
{
|
||||
_unitOfWork = value;
|
||||
if (_dbsetPriv != null) _dbsetPriv._uow = _unitOfWork; //防止 dbset 对象已经存在,再次设置 UnitOfWork 无法生效,所以作此判断重新设置
|
||||
}
|
||||
get => _unitOfWork;
|
||||
}
|
||||
public IUpdate<TEntity> UpdateDiy => _dbset.OrmUpdateInternal(null);
|
||||
|
||||
public ISelect<TEntity> Select => _dbset.OrmSelectInternal(null);
|
||||
|
Reference in New Issue
Block a user