Show / Hide Table of Contents

Class InMemoryTenantRepository<T, TKey>

In-memory implementation of IAsyncTenantRepository for testing service layers without any storage emulator or connection string.

Inheritance
object
InMemoryTenantRepository<T, TKey>
Implements
IAsyncTenantRepository<T, TKey>
IAsyncRepository<T, TKey>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.Common.Testing
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
Name Description
T
TKey

Methods

| Edit this page View Source

DeleteAsync(T)

Declaration
public Task DeleteAsync(T entity)
Parameters
Type Name Description
T entity
Returns
Type Description
Task
| 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
Type Description
Task<T>
| Edit this page View Source

GetByTenantAsync(string)

Declaration
public Task<IList<T>> GetByTenantAsync(string tenantId)
Parameters
Type Name Description
string tenantId
Returns
Type Description
Task<IList<T>>
| Edit this page View Source

SaveAsync(T)

Declaration
public Task SaveAsync(T entity)
Parameters
Type Name Description
T entity
Returns
Type Description
Task

Implements

Benday.Common.Interfaces.IAsyncTenantRepository<T, TKey>
Benday.Common.Interfaces.IAsyncRepository<T, TKey>

Extension Methods

ObjectAssertExtensions.ShouldBeNull<T>(T?, string)
ObjectAssertExtensions.ShouldBeSameAs<T>(T, T, string)
ObjectAssertExtensions.ShouldEqual<T>(T, T, string)
ObjectAssertExtensions.ShouldNotBeNull<T>(T?, string)
ObjectAssertExtensions.ShouldNotBeSameAs<T>(T, T, string)
ObjectAssertExtensions.ShouldNotEqual<T>(T, T, string)
ObjectAssertExtensions.ShouldBeOfType<T>(object?, string)
ObjectAssertExtensions.ShouldNotBeOfType<T>(object?, string)
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com