mirror of https://github.com/abpframework/abp.git
9 changed files with 79 additions and 21 deletions
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using System.Data; |
|||
|
|||
namespace Volo.Abp.Uow |
|||
{ |
|||
public interface IUnitOfWorkStartOptions |
|||
{ |
|||
bool IsTransactional { get; } |
|||
|
|||
IsolationLevel? IsolationLevel { get; } |
|||
|
|||
TimeSpan? Timeout { get; } |
|||
} |
|||
} |
|||
@ -1,15 +1,34 @@ |
|||
using System.Data; |
|||
using System; |
|||
using System.Data; |
|||
|
|||
namespace Volo.Abp.Uow |
|||
{ |
|||
//TODO: Implement default options!
|
|||
|
|||
/// <summary>
|
|||
/// Global (default) unit of work options
|
|||
/// </summary>
|
|||
public class UnitOfWorkOptions |
|||
{ |
|||
//TODO: Implement default options!
|
|||
public UnitOfWorkTransactionBehavior TransactionBehavior { get; set; } |
|||
|
|||
public IsolationLevel? IsolationLevel { get; set; } |
|||
|
|||
public TimeSpan? Timeout { get; set; } |
|||
|
|||
internal UnitOfWorkStartOptions Normalize(UnitOfWorkStartOptions options) |
|||
{ |
|||
if (options.IsolationLevel == null) |
|||
{ |
|||
options.IsolationLevel = IsolationLevel; |
|||
} |
|||
|
|||
if (options.Timeout == null) |
|||
{ |
|||
options.Timeout = Timeout; |
|||
} |
|||
|
|||
return options; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue