- 优化 IUnitOfWork/DbContext/Repository .Orm.Ado 和 CRUD 都与自身事务保持一致;

This commit is contained in:
2881099
2020-12-03 23:57:26 +08:00
parent 7323b2d093
commit eae4fa4a86
25 changed files with 76 additions and 217 deletions

View File

@@ -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