mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-09-18 09:25:35 +08:00
- 优化 IUnitOfWork/DbContext/Repository .Orm.Ado 和 CRUD 都与自身事务保持一致;
This commit is contained in:
@@ -13,6 +13,10 @@ namespace FreeSql
|
||||
{
|
||||
internal DbContextScopedFreeSql _ormScoped;
|
||||
internal IFreeSql OrmOriginal => _ormScoped?._originalFsql ?? throw new ArgumentNullException("请在 OnConfiguring 或 AddFreeDbContext 中配置 UseFreeSql");
|
||||
|
||||
/// <summary>
|
||||
/// 该对象 Select/Delete/Insert/Update/InsertOrUpdate 与 DbContext 事务保持一致,可省略传递 WithTransaction
|
||||
/// </summary>
|
||||
public IFreeSql Orm => _ormScoped ?? throw new ArgumentNullException("请在 OnConfiguring 或 AddFreeDbContext 中配置 UseFreeSql");
|
||||
|
||||
#region Property UnitOfWork
|
||||
|
Reference in New Issue
Block a user