Table of Contents

Class DapperExtensionsDataStore<T>

Namespace
Savvyio.Extensions.DapperExtensions
Assembly
Savvyio.Extensions.DapperExtensions.dll

Provides a default implementation of the DapperDataStore<T, TOptions> class that is tailored for Plain Old CLR Objects (POCO) usage by DapperExtensions.

public class DapperExtensionsDataStore<T> : DapperDataStore<T, DapperExtensionsQueryOptions<T>>, IDisposable, IPersistentDataStore<T, DapperExtensionsQueryOptions<T>>, IWritableDataStore<T>, IReadableDataStore<T>, ISearchableDataStore<T, DapperExtensionsQueryOptions<T>>, IDeletableDataStore<T>, IDataStore<T> where T : class

Type Parameters

T

The type of the DTO.

Inheritance
DapperExtensionsDataStore<T>
Implements
Derived
Inherited Members

Constructors

DapperExtensionsDataStore(IDapperDataSource)

Initializes a new instance of the DapperExtensionsDataStore<T> class.

public DapperExtensionsDataStore(IDapperDataSource source)

Parameters

source IDapperDataSource

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

Methods

CreateAsync(T, Action<AsyncOptions>)

Creates the specified dto asynchronous in the associated IDapperDataSource.

public override Task CreateAsync(T dto, Action<AsyncOptions> setup = null)

Parameters

dto T

The object to create in the associated IDapperDataSource.

setup Action<AsyncOptions>

The AsyncOptions that needs to be configured.

Returns

Task

A Task that represents the asynchronous operation.

DeleteAsync(T, Action<AsyncOptions>)

Deletes the specified dto asynchronous in the associated IDapperDataSource.

public override Task DeleteAsync(T dto, Action<AsyncOptions> setup = null)

Parameters

dto T

The object to delete in the associated IDapperDataSource.

setup Action<AsyncOptions>

The AsyncOptions that needs to be configured.

Returns

Task

A Task that represents the asynchronous operation.

FindAllAsync(Action<DapperExtensionsQueryOptions<T>>)

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

public override Task<IEnumerable<T>> FindAllAsync(Action<DapperExtensionsQueryOptions<T>> setup = null)

Parameters

setup Action<DapperExtensionsQueryOptions<T>>

The DapperQueryOptions that needs to be configured.

Returns

Task<IEnumerable<T>>

A Task<TResult> that represents the asynchronous operation. The task result either contains the matching objects of the operation or an empty sequence if no match was found.

GetByIdAsync(object, Action<AsyncOptions>)

Loads the object from the specified id asynchronous.

public override Task<T> GetByIdAsync(object id, Action<AsyncOptions> setup = null)

Parameters

id object

The key that uniquely identifies the object.

setup Action<AsyncOptions>

The AsyncOptions that needs to be configured.

Returns

Task<T>

A Task<TResult> that represents the asynchronous operation. The task result either contains the object of the operation or null if not found.

UpdateAsync(T, Action<AsyncOptions>)

Updates the specified dto asynchronous in the associated IDapperDataSource.

public override Task UpdateAsync(T dto, Action<AsyncOptions> setup = null)

Parameters

dto T

The object to update in the associated IDapperDataSource.

setup Action<AsyncOptions>

The AsyncOptions that needs to be configured.

Returns

Task

A Task that represents the asynchronous operation.

See Also

DapperDataStore<T, TOptions>