Class InMemoryReadableRepository<T, TKey>
In-memory implementation of IAsyncReadableRepository for testing
service layers with single-key entities (non-owned).
Inheritance
InMemoryReadableRepository<T, TKey>
Implements
IAsyncReadableRepository<T, TKey>
IAsyncRepository<T, TKey>
Assembly: Benday.Common.Testing.dll
Syntax
public class InMemoryReadableRepository<T, TKey> : IAsyncReadableRepository<T, TKey>, IAsyncRepository<T, TKey> where T : IEntityIdentity<TKey> where TKey : IEquatable<TKey>
Type Parameters
Methods
|
Edit this page
View Source
DeleteAsync(T)
Declaration
public Task DeleteAsync(T entity)
Parameters
| Type |
Name |
Description |
| T |
entity |
|
Returns
|
Edit this page
View Source
GetAllAsync()
Declaration
public Task<IList<T>> GetAllAsync()
Returns
|
Edit this page
View Source
GetByIdAsync(TKey)
Declaration
public Task<T?> GetByIdAsync(TKey id)
Parameters
| Type |
Name |
Description |
| TKey |
id |
|
Returns
|
Edit this page
View Source
SaveAsync(T)
Declaration
public Task SaveAsync(T entity)
Parameters
| Type |
Name |
Description |
| T |
entity |
|
Returns
Implements
Benday.Common.Interfaces.IAsyncReadableRepository<T, TKey>
Benday.Common.Interfaces.IAsyncRepository<T, TKey>
Extension Methods