Class InProcessDataStore<TData>
A IDataStore<TData> using an Cqrs.DataStores.InProcessDataStore`1.InMemoryDatabase.
Inheritance
Inherited Members
Namespace: Cqrs.DataStores
Assembly: Cqrs.dll
Syntax
public class InProcessDataStore<TData> : IDataStore<TData>, IOrderedQueryable<TData>, IQueryable<TData>, IEnumerable<TData>, IOrderedQueryable, IQueryable, IEnumerable, IDisposable where TData : Entity
Type Parameters
Name | Description |
---|---|
TData |
Constructors
InProcessDataStore()
Instantiates a new instance of the InProcessDataStore<TData> class
Declaration
public InProcessDataStore()
Properties
ElementType
Gets the type of the element(s) that are returned when the expression tree associated with this instance of System.Linq.IQueryable is executed.
Declaration
public Type ElementType { get; }
Property Value
Type | Description |
---|---|
System.Type | A System.Type that represents the type of the element(s) that are returned when the expression tree associated with this object is executed. |
Implements
Expression
Gets the expression tree that is associated with the instance of System.Linq.IQueryable.
Declaration
public Expression Expression { get; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.Expression | The System.Linq.Expressions.Expression that is associated with this instance of System.Linq.IQueryable. |
Implements
Provider
Gets the singleResultQuery provider that is associated with this data source.
Declaration
public IQueryProvider Provider { get; }
Property Value
Type | Description |
---|---|
System.Linq.IQueryProvider | The System.Linq.IQueryProvider that is associated with this data source. |
Implements
Methods
Add(TData)
Add the provided data
to the data store and persist the change.
Declaration
public void Add(TData data)
Parameters
Type | Name | Description |
---|---|---|
TData | data |
Implements
Add(IEnumerable<TData>)
Add the provided data
to the data store and persist the change.
Declaration
public void Add(IEnumerable<TData> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TData> | data |
Implements
Destroy(TData)
Remove the provided data
(normally by Rsn) from the data store and persist the change.
Declaration
public void Destroy(TData data)
Parameters
Type | Name | Description |
---|---|---|
TData | data |
Implements
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<TData> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TData> | A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
Implements
Remove(TData)
Will mark the data
as logically (or soft) deleted by setting IsLogicallyDeleted to true in the data store and persist the change.
Declaration
public void Remove(TData data)
Parameters
Type | Name | Description |
---|---|---|
TData | data |
Implements
RemoveAll()
Remove all contents (normally by use of a truncate operation) from the data store and persist the change.
Declaration
public void RemoveAll()
Implements
Update(TData)
Update the provided data
in the data store and persist the change.
Declaration
public void Update(TData data)
Parameters
Type | Name | Description |
---|---|---|
TData | data |
Implements
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |