Show / Hide Table of Contents

Interface IDatabaseReaderMapper

Provides an interface for database reaader mappers.

Namespace: Paradigm.ORM.Data.Mappers
Assembly: Paradigm.ORM.Data.dll
Syntax
public interface IDatabaseReaderMapper
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, and extracting the mapping information from the class attributes.

Methods

| Improve this Doc View Source

Map(IDatabaseReader)

Gets a list of objects mapped from a database reader.

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

A database reader cursor.

Returns
Type Description
List<System.Object>

A list of mapped objects.

| Improve this Doc View Source

MapAsync(IDatabaseReader)

Gets a list of objects already mapped from a known table, to a known object type.

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

A database reader cursor.

Returns
Type Description
Task<List<System.Object>>

A list of mapped objects.

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

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