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 SourceMap(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. |
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. |