TestingUnitOfWork Class
Assembly: Modules.Tests.dll
Testing Unit of Work which contains a very simple implementation for resolving repositories.
Syntax
public class TestingUnitOfWork : IUnitOfWork, IServiceProviderAccessor
Inheritance
System.Object
TestingUnitOfWork
Constructors
TestingUnitOfWork()
Declaration
public TestingUnitOfWork()
Properties
ServiceProvider
Declaration
public IServiceProvider ServiceProvider { get; }
Property Value
Type |
Description |
System.IServiceProvider |
|
Methods
Repository(Type)
Declaration
public IRepository Repository(Type entityType)
Parameters
Type |
Name |
Description |
System.Type |
entityType |
|
Returns
Repository<TEntity>()
Declaration
public IRepository<TEntity> Repository<TEntity>()
where TEntity : class
Returns
Type Parameters
SaveChanges()
Declaration
Returns
Type |
Description |
System.Int32 |
|
SaveChanges(Object)
Declaration
public int SaveChanges(object sender)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Returns
Type |
Description |
System.Int32 |
|
SaveChangesAsync(Object, CancellationToken)
Declaration
public Task<int> SaveChangesAsync(object sender, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
SaveChangesAsync(CancellationToken)
Declaration
public Task<int> SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Extension Methods