Show / Hide Table of Contents

Class InMemoryReadableRepository<T, TKey>

In-memory implementation of IAsyncReadableRepository for testing service layers with single-key entities (non-owned).

Inheritance
object
InMemoryReadableRepository<T, TKey>
Implements
IAsyncReadableRepository<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 InMemoryReadableRepository<T, TKey> : IAsyncReadableRepository<T, TKey>, IAsyncRepository<T, TKey> where T : IEntityIdentity<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

GetAllAsync()

Declaration
public Task<IList<T>> GetAllAsync()
Returns
Type Description
Task<IList<T>>
| Edit this page View Source

GetByIdAsync(TKey)

Declaration
public Task<T?> GetByIdAsync(TKey id)
Parameters
Type Name Description
TKey id
Returns
Type Description
Task<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.IAsyncReadableRepository<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