Class DatabasesBase<TConfiguration>.DataConnection
Inheritance
Inherited Members
Namespace: ArgentSea
Assembly: ArgentSea.dll
Syntax
public class DataConnectionProperties
| Improve this Doc View SourceConnectionString
Declaration
public string ConnectionString { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Methods
| Improve this Doc View SourceListAsync<TValue>(Query, DbParameterCollection, String, CancellationToken)
Connect to the database and return a list of column values.
Declaration
public Task<List<TValue>> ListAsync<TValue>(Query query, DbParameterCollection parameters, string columnName, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.String | columnName | This should match the name of a column containing the values. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<TValue>> | A list containing an object for each data row. | 
Type Parameters
| Name | Description | 
|---|---|
| TValue | The type of the return value, typically: Boolean, Byte, Char, DateTime, DateTimeOffset, Decimal, Double, Float, Guid, Int16, Int32, Int64, or String. | 
MapListAsync<TModel>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return the values as a list of objects.
Declaration
public Task<List<TModel>> MapListAsync<TModel>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<TModel>> | A list containing an object for each data row. | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | The type of object to be listed. | 
MapOutputAsync<TModel>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. | 
MapOutputAsync<TModel, TReaderResult>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult | The first result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. This it will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()
    where TReaderResult6 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. This it will be mapped to any property with a List of this type. | 
| TReaderResult6 | The seventh result set from data reader. This will be mapped to any property with a List of this type. | 
MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results and output parameters.
Declaration
public Task<TModel> MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()
    where TReaderResult6 : class, new()
    where TReaderResult7 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query and should map to the output parameters. | 
| TReaderResult0 | The first result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. This it will be mapped to any property with a List of this type. | 
| TReaderResult6 | The seventh result set from data reader. This will be mapped to any property with a List of this type. | 
| TReaderResult7 | The eighth result set from data reader. This will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results parameters.
Declaration
public Task<TModel> MapReaderAsync<TModel>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()
    where TReaderResult6 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult6 | The seventh result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(Query, DbParameterCollection, CancellationToken)
Connect to the database and return an object of the specified type built from the corresponding data reader results.
Declaration
public Task<TModel> MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)
    where TModel : class, new()
    where TReaderResult0 : class, new()
    where TReaderResult1 : class, new()
    where TReaderResult2 : class, new()
    where TReaderResult3 : class, new()
    where TReaderResult4 : class, new()
    where TReaderResult5 : class, new()
    where TReaderResult6 : class, new()
    where TReaderResult7 : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | This is the expected return type of the query. It must also be the same type as one of the TReaderResult values. | 
| TReaderResult0 | The first result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult1 | The second result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult2 | The third result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult3 | The forth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult4 | The fifth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult5 | The sixth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult6 | The seventh result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
| TReaderResult7 | The eighth result set from data reader. If the same type as TModel, it must return exactly one record. Otherwise, it will be mapped to any property with a List of this type. | 
QueryAsync<TModel>(Query, DbParameterCollection, QueryResultModelHandler<Int32, Object, TModel>, Boolean, CancellationToken)
Connect to the database and return the TModel object returned by the delegate.
Declaration
public Task<TModel> QueryAsync<TModel>(Query query, DbParameterCollection parameters, QueryResultModelHandler<int, object, TModel> resultHandler, bool isTopOne, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| QueryResultModelHandler<System.Int32, System.Object, TModel> | resultHandler | A method with a signature that corresponds to the QueryResultModelHandler delegate, which converts the provided DataReader and output parameters and returns an object of type TModel. | 
| System.Boolean | isTopOne | If the procedure or function is expected to return only one record, setting this to True provides a minor optimization. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | An object of type TModel, as created and populated by the provided delegate. | 
Type Parameters
| Name | Description | 
|---|---|
| TModel | The type of the object to be returned. | 
QueryAsync<TArg, TModel>(Query, DbParameterCollection, QueryResultModelHandler<Int32, TArg, TModel>, Boolean, TArg, CancellationToken)
Connect to the database and return the TModel object returned by the delegate.
Declaration
public Task<TModel> QueryAsync<TArg, TModel>(Query query, DbParameterCollection parameters, QueryResultModelHandler<int, TArg, TModel> resultHandler, bool isTopOne, TArg optionalArgument, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters. | 
| QueryResultModelHandler<System.Int32, TArg, TModel> | resultHandler | A method with a signature that corresponds to the QueryResultModelHandler delegate, which converts the provided DataReader and output parameters and returns an object of type TModel. | 
| System.Boolean | isTopOne | If the procedure or function is expected to return only one record, setting this to True provides a minor optimization. | 
| TArg | optionalArgument | |
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TModel> | An object of type TModel, as created and populated by the provided delegate. | 
Type Parameters
| Name | Description | 
|---|---|
| TArg | |
| TModel | The type of the object to be returned. | 
ReturnValueAsync(Query, DbParameterCollection, CancellationToken)
Invokes the query and returns the integer result.
Declaration
public Task<int> ReturnValueAsync(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | |
| System.Threading.CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | 
ReturnValueAsync<TValue>(Query, DbParameterCollection, String, CancellationToken)
Invokes the query and returns the output parameter or first-row column value matching the “dataName”.
Declaration
public Task<TValue> ReturnValueAsync<TValue>(Query query, DbParameterCollection parameters, string dataName, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the value. | 
| System.Data.Common.DbParameterCollection | parameters | A parameters collction. Input parameters may be used to find the parameter; output parameter should match dataName arguement. | 
| System.String | dataName | If this values matches the name of a output parameter, then this returns that value; otherwise, this should match the name of a column. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TValue> | The output parameter or first-row column retrieved from the query. | 
Type Parameters
| Name | Description | 
|---|---|
| TValue | The type of the return value, typically: Boolean, Byte, Char, DateTime, DateTimeOffset, Decimal, Double, Float, Guid, Int16, Int32, Int64, or String. | 
RunAsync(Query, DbParameterCollection, CancellationToken)
Executes a database procedure or function that does not return a data result.
Declaration
public Task RunAsync(Query query, DbParameterCollection parameters, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | The SQL procedure or statement to invoke to fetch the data. | 
| System.Data.Common.DbParameterCollection | parameters | The query parameters with values set. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | Throws an error if not successful. | 
RunAsync<TResult>(DatabaseBatch<TResult>, CancellationToken)
Execute a set of commands within a single transaction.
Declaration
public Task<TResult> RunAsync<TResult>(DatabaseBatch<TResult> batch, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| DatabaseBatch<TResult> | batch | The QueryBatch object. | 
| System.Threading.CancellationToken | cancellationToken | A token to cancel the asynchronous operation. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<TResult> | The last valid TResult type returned by the collection of commands. | 
Type Parameters
| Name | Description | 
|---|---|
| TResult | The optional return type specified in the batch. |