mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
update TransactionalAttribute
This commit is contained in:
@ -15,7 +15,8 @@ namespace FreeSql
|
||||
public class TransactionalAttribute : DynamicProxyAttribute, IActionFilter
|
||||
{
|
||||
public Propagation Propagation { get; set; } = Propagation.Requierd;
|
||||
public IsolationLevel? IsolationLevel { get; set; }
|
||||
public IsolationLevel IsolationLevel { get => _IsolationLevelPriv.Value; set => _IsolationLevelPriv = value; }
|
||||
IsolationLevel? _IsolationLevelPriv;
|
||||
|
||||
[DynamicProxyFromServices]
|
||||
UnitOfWorkManager _uowManager;
|
||||
@ -31,7 +32,7 @@ namespace FreeSql
|
||||
|
||||
Task OnBefore(UnitOfWorkManager uowm)
|
||||
{
|
||||
_uow = uowm.Begin(this.Propagation, this.IsolationLevel);
|
||||
_uow = uowm.Begin(this.Propagation, this._IsolationLevelPriv);
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
Task OnAfter(Exception ex)
|
||||
|
Reference in New Issue
Block a user