| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System.Threading.Tasks;
- namespace Abp.Domain.Uow
- {
- /// <summary>
- /// Null implementation of unit of work.
- /// It's used if no component registered for <see cref="IUnitOfWork"/>.
- /// This ensures working ABP without a database.
- /// </summary>
- public sealed class NullUnitOfWork : UnitOfWorkBase
- {
- public override void SaveChanges()
- {
- }
- public override Task SaveChangesAsync()
- {
- return Task.FromResult(0);
- }
- protected override void BeginUow()
- {
- }
- protected override void CompleteUow()
- {
- }
- protected override Task CompleteUowAsync()
- {
- return Task.FromResult(0);
- }
- protected override void DisposeUow()
- {
- }
- public NullUnitOfWork(
- IConnectionStringResolver connectionStringResolver,
- IUnitOfWorkDefaultOptions defaultOptions,
- IUnitOfWorkFilterExecuter filterExecuter
- ) : base(
- connectionStringResolver,
- defaultOptions,
- filterExecuter)
- {
- }
- }
- }
|