Class DatabaseReaderMapper<TEntity>
Provides a way to map from a IDatabaseReader to a known object type.
Inherited Members
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 SourceDatabaseReaderMapper(IServiceProvider)
Initializes a new instance of the DatabaseReaderMapper class.
Declaration
public DatabaseReaderMapper(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The service provider. |
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. |
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. |
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. |
DatabaseReaderMapper(IDatabaseConnector)
Initializes a new instance of the DatabaseReaderMapper class.
Declaration
public DatabaseReaderMapper(IDatabaseConnector connector)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseConnector | connector | The connector. |
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 SourceMap(IDatabaseReader)
Gets a list of
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 |
MapAsync(IDatabaseReader)
Gets a list of
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 |