Show / Hide Table of Contents

Interface IDatabaseReaderMapper<TEntity>

Provides an interface for database reaader mappers.

Namespace: Paradigm.ORM.Data.Mappers.Generic
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IDatabaseReaderMapper<TEntity> : IDatabaseReaderMapper
Type Parameters
Name Description
TEntity

A type containing mapping information.

Remarks

When executing database reading commands, the command will return a IDatabaseReader object, which will be used to extract the result sets and registers from the database. The IDatabaseReaderMapper provides a way to automatically map one of the result sets to a known object type. This mapper works by creating a TableTypeDescriptor from the TEntity type, and extracting the mapping information from the class attributes.

Methods

| Improve this Doc View Source

Map(IDatabaseReader)

Gets a list of from a IDatabaseReader.

Declaration
List<TEntity> Map(IDatabaseReader reader)
Parameters
Type Name Description
IDatabaseReader reader

A database reader cursor.

Returns
Type Description
List<TEntity>

A list of .

| Improve this Doc View Source

MapAsync(IDatabaseReader)

Gets a list of from a IDatabaseReader.

Declaration
Task<List<TEntity>> MapAsync(IDatabaseReader reader)
Parameters
Type Name Description
IDatabaseReader reader

A database reader cursor.

Returns
Type Description
Task<List<TEntity>>

A list of .

Extension Methods

ObjectExtensions.ThrowIfFails<TException>(Object, Action, String)
ObjectExtensions.ThrowIfFails<TException, TResult>(Object, Func<TResult>, String)
ObjectExtensions.ThrowIfFailsAsync<TException>(Object, Func<Task>, String)
ObjectExtensions.ThrowIfFailsAsync<TException, TResult>(Object, Func<Task<TResult>>, String)

See Also

IDatabaseReaderMapper
TableTypeDescriptor
TableTypeAttribute
TableAttribute
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.