Show / Hide Table of Contents

Class DatabaseReaderMapper<TEntity>

Provides a way to map from a IDatabaseReader to a known object type.

Inheritance
System.Object
DatabaseReaderMapper
DatabaseReaderMapper<TEntity>
Implements
IDatabaseReaderMapper<TEntity>
IDatabaseReaderMapper
Inherited Members
DatabaseReaderMapper.MapRowAsync(IDatabaseReader)
DatabaseReaderMapper.ServiceProvider
DatabaseReaderMapper.Descriptor
DatabaseReaderMapper.Connector
DatabaseReaderMapper.ValueConverter
DatabaseReaderMapper.CreateInstance()
DatabaseReaderMapper.MapRow(IDatabaseReader)
Namespace: Paradigm.ORM.Data.Mappers.Generic
Assembly: Paradigm.ORM.Data.dll
Syntax
public class DatabaseReaderMapper<TEntity> : DatabaseReaderMapper, IDatabaseReaderMapper<TEntity>, IDatabaseReaderMapper
Type Parameters
Name Description
TEntity

A type containing mapping information.

Constructors

| Improve this Doc View Source

DatabaseReaderMapper(IServiceProvider)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IServiceProvider serviceProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

| Improve this Doc View Source

DatabaseReaderMapper(IServiceProvider, IDatabaseConnector)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IServiceProvider serviceProvider, IDatabaseConnector connector)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

IDatabaseConnector connector

A reference to a database connector.

| Improve this Doc View Source

DatabaseReaderMapper(IServiceProvider, IDatabaseConnector, IColumnPropertyDescriptorCollection)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IServiceProvider serviceProvider, IDatabaseConnector connector, IColumnPropertyDescriptorCollection descriptor)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

IDatabaseConnector connector

A reference to a database connector.

IColumnPropertyDescriptorCollection descriptor

A column property descriptor collection to extract mapping information.

| Improve this Doc View Source

DatabaseReaderMapper(IServiceProvider, IColumnPropertyDescriptorCollection)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IServiceProvider serviceProvider, IColumnPropertyDescriptorCollection descriptor)
Parameters
Type Name Description
IServiceProvider serviceProvider

The service provider.

IColumnPropertyDescriptorCollection descriptor

A column property descriptor collection to extract mapping information.

| Improve this Doc View Source

DatabaseReaderMapper(IDatabaseConnector)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IDatabaseConnector connector)
Parameters
Type Name Description
IDatabaseConnector connector

The connector.

| Improve this Doc View Source

DatabaseReaderMapper(IDatabaseConnector, IColumnPropertyDescriptorCollection)

Initializes a new instance of the DatabaseReaderMapper class.

Declaration
public DatabaseReaderMapper(IDatabaseConnector connector, IColumnPropertyDescriptorCollection descriptor)
Parameters
Type Name Description
IDatabaseConnector connector

A reference to a database connector.

IColumnPropertyDescriptorCollection descriptor

A column property descriptor collection to extract mapping information.

Exceptions
Type Condition
System.ArgumentNullException

Methods

| Improve this Doc View Source

Map(IDatabaseReader)

Gets a list of mapped from a database reader.

Declaration
public 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 mapped from a database reader.

Declaration
public 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 .

Implements

IDatabaseReaderMapper<TEntity>
IDatabaseReaderMapper

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

DatabaseReaderMapper
IDatabaseReaderMapper<TEntity>
  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.