-
Notifications
You must be signed in to change notification settings - Fork 0
Izayoi.Data.DbDataMapper
IzayoiJiichan edited this page Sep 7, 2024
·
9 revisions
Namespace | Izayoi.Data |
Assembly | Izayoi.Data.DbDataMapper.dll |
Represents a DB data mapper.
public class DbDataMapper : IDbDataMapper
Object -> DbDataMapper
Name | Summary |
---|---|
DbDataMapper() | Initializes an instance of the DbDataMapper class. |
DbDataMapper(DbDataMapperOption option) | Initializes an instance of the DbDataMapper class with the specified option. |
Option
DbDataMapperOption
Gets the DB data mapper option.
Name | Returns | Summary |
---|---|---|
ReadToObjectAsync<T>(DbDataReader dbDataReader, CancellationToken cancellationToken) | Task<T?> | Gets the first record from the DB data reader's record set, sets the values for the specified T class, and returns it. |
ReadToObjectsAsync<T>(DbDataReader dbDataReader, CancellationToken cancellationToken) | Task<List<T>> | Gets the records from the DB data reader's record set, sets the values for the specified T class, and returns it. |
ExecuteQueryAsync<T>(DbCommand dbCommand, CancellationToken cancellationToken) | Task<List<T>> | Executes a DB command and returns the record set in an object. |
SelectAllAsync<T>(DbCommand dbCommand, CancellationToken cancellationToken) | Task<List<T>> | Executes a SELECT query and returns the record set in an object. |
GetColumnNameMapper(Type objectType) | PropertyMapper | Gets the column name mapper of the specified object type. |
GetSchemaAndTable(Type objectType) | (string schemaName, string tableName) | Gets the schema and table name of the specified object type. |
GetSchemaName(Type objectType) | string | Gets the schema name of the specified object type. |
GetTableName(Type objectType) | string | Gets the table name of the specified object type. |
SetTableName(Type objectType, string tableName) | void | Sets the table name for the specified object type in the cache. |
SetTableAndSchema(Type objectType, string tableName, string schemaName) | void | Sets the table and schema name for the specified object type in the cache. |
Reuse a DbDataMapper
object whenever possible.
Product | Versions |
---|---|
.NET | 8 |
- Izayoi.Data
- Izayoi.Data.Query
- Izayoi.Data.Repository
- Izayoi.Data.Validation
Examples