Class InMemoryTenantRepository<T, TKey>
In-memory implementation of IAsyncTenantRepository for testing
service layers without any storage emulator or connection string.
Inheritance
InMemoryTenantRepository<T, TKey>
Implements
IAsyncTenantRepository<T, TKey>
IAsyncRepository<T, TKey>
Assembly: Benday.Common.Testing.dll
Syntax
public class InMemoryTenantRepository<T, TKey> : IAsyncTenantRepository<T, TKey>, IAsyncRepository<T, TKey> where T : ITenantItem<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
GetByIdAsync(string, TKey)
Declaration
public Task<T?> GetByIdAsync(string tenantId, TKey id)
Parameters
| Type |
Name |
Description |
| string |
tenantId |
|
| TKey |
id |
|
Returns
|
Edit this page
View Source
GetByTenantAsync(string)
Declaration
public Task<IList<T>> GetByTenantAsync(string tenantId)
Parameters
| Type |
Name |
Description |
| string |
tenantId |
|
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.IAsyncTenantRepository<T, TKey>
Benday.Common.Interfaces.IAsyncRepository<T, TKey>
Extension Methods