Table of Contents

DapperDataStore<T, TOptions> Class

Definition

Namespace
Savvyio.Extensions.Dapper
Assemblies
Savvyio.Extensions.Dapper.dll
Source
src/Savvyio.Extensions.Dapper/DapperDataStore.cs

Represents the base class from which all implementations of DapperDataStore<T, TOptions> should derive. This is an abstract class to serve as an abstraction layer before the actual I/O communication with a source of data using Dapper.

public abstract class DapperDataStore<T, TOptions> : Disposable, IDisposable, IPersistentDataStore<T, TOptions>, IWritableDataStore<T>, IReadableDataStore<T>, ISearchableDataStore<T, TOptions>, IDeletableDataStore<T>, IDataStore<T> where T : class where TOptions : AsyncOptions, new()

Type Parameters

T

The type of the DTO.

TOptions

The type of options associated with this DTO.

Inheritance
object
DapperDataStore<T, TOptions>
Implements
Derived
Inherited Members

Constructors

Name Description
DapperDataStore(IDapperDataSource)

Initializes a new instance of the DapperDataStore<T, TOptions> class.

Properties

Name Description
Source

Gets the IDapperDataSource that handles actual I/O communication with a source of data.

Methods

Name Description
CreateAsync(T, Action<AsyncOptions>)

Creates the specified dto asynchronous in the associated IDapperDataSource.

DeleteAsync(T, Action<AsyncOptions>)

Deletes the specified dto asynchronous in the associated IDapperDataSource.

FindAllAsync(Action<TOptions>)

Finds all objects matching the specified setup asynchronous in the associated IDapperDataSource.

GetByIdAsync(object, Action<AsyncOptions>)

Loads the object from the specified id asynchronous.

OnDisposeManagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) having disposing set to true and Disposed is false.

UpdateAsync(T, Action<AsyncOptions>)

Updates the specified dto asynchronous in the associated IDapperDataSource.

See Also