Skip to content

Commit 655245a

Browse files
committed
- 修复 UnitlOfWorkManager 绑定 DbContext 事务问题;
1 parent 840b6c8 commit 655245a

2 files changed

Lines changed: 10 additions & 110 deletions

File tree

FreeSql.DbContext/DbSet/DbSet.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ class DbContextDbSet<TEntity> : DbSet<TEntity> where TEntity : class
1919
public DbContextDbSet(DbContext ctx)
2020
{
2121
_db = ctx;
22-
_uow = ctx.UnitOfWork;
22+
}
23+
24+
internal override IUnitOfWork _uow
25+
{
26+
get => _db.UnitOfWork;
27+
set
28+
{
29+
if (_db.UnitOfWork != value)
30+
_db.UnitOfWork = value;
31+
}
2332
}
2433
}
2534

FreeSql/FreeSql.xml

Lines changed: 0 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)