mirror of https://github.com/abpframework/abp.git
9 changed files with 61 additions and 62 deletions
Binary file not shown.
@ -1,26 +0,0 @@ |
|||||
using System; |
|
||||
using System.Threading; |
|
||||
using System.Threading.Tasks; |
|
||||
|
|
||||
namespace Volo.Abp.Uow |
|
||||
{ |
|
||||
//TODO: Find a better naming :(
|
|
||||
public interface IBasicUnitOfWork : IDisposable |
|
||||
{ |
|
||||
Guid Id { get; } |
|
||||
|
|
||||
event EventHandler Completed; |
|
||||
|
|
||||
event EventHandler<UnitOfWorkFailedEventArgs> Failed; |
|
||||
|
|
||||
event EventHandler Disposed; |
|
||||
|
|
||||
void SaveChanges(); |
|
||||
|
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken)); |
|
||||
|
|
||||
void Complete(); |
|
||||
|
|
||||
Task CompleteAsync(CancellationToken cancellationToken = default(CancellationToken)); |
|
||||
} |
|
||||
} |
|
||||
@ -1,19 +1,40 @@ |
|||||
using JetBrains.Annotations; |
using System; |
||||
|
using System.Threading; |
||||
|
using System.Threading.Tasks; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
namespace Volo.Abp.Uow |
namespace Volo.Abp.Uow |
||||
{ |
{ |
||||
public interface IUnitOfWork : IBasicUnitOfWork, IDatabaseApiContainer, ITransactionApiContainer |
public interface IUnitOfWork : IDatabaseApiContainer, ITransactionApiContainer, IDisposable |
||||
{ |
{ |
||||
|
Guid Id { get; } |
||||
|
|
||||
|
event EventHandler Completed; |
||||
|
|
||||
|
event EventHandler<UnitOfWorkFailedEventArgs> Failed; |
||||
|
|
||||
|
event EventHandler Disposed; |
||||
|
|
||||
IUnitOfWorkOptions Options { get; } |
IUnitOfWorkOptions Options { get; } |
||||
|
|
||||
IUnitOfWork Outer { get; } |
IUnitOfWork Outer { get; } |
||||
|
|
||||
bool IsReserved { get; set; } |
bool IsReserved { get; } |
||||
|
|
||||
string ReservationName { get; set; } |
string ReservationName { get; } |
||||
|
|
||||
void SetOuter([CanBeNull] IUnitOfWork outer); |
void SetOuter([CanBeNull] IUnitOfWork outer); |
||||
|
|
||||
void Initialize([NotNull] UnitOfWorkOptions options); |
void Initialize([NotNull] UnitOfWorkOptions options); |
||||
|
|
||||
|
void Reserve([NotNull] string reservationName); |
||||
|
|
||||
|
void SaveChanges(); |
||||
|
|
||||
|
Task SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken)); |
||||
|
|
||||
|
void Complete(); |
||||
|
|
||||
|
Task CompleteAsync(CancellationToken cancellationToken = default(CancellationToken)); |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue