Class InMemoryDatabase
Uses a static System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue> to store data accessible by all threads.
Inheritance
System.Object
InMemoryDatabase
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Repositories
Assembly: Cqrs.dll
Syntax
public class InMemoryDatabase
Methods
Get<TEntity>()
Gets all instances of the specific TEntity
grouped by their ID.
Declaration
public IDictionary<Guid, TEntity> Get<TEntity>()where TEntity : Entity
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.Guid, TEntity> |
Type Parameters
Name | Description |
---|---|
TEntity |
GetAll<TEntity>()
Gets all instances of the specific TEntity
Declaration
public IList<TEntity> GetAll<TEntity>()where TEntity : Entity
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<TEntity> |
Type Parameters
Name | Description |
---|---|
TEntity |