Show / Hide Table of Contents

    Class ShardSetsBase<TShard, TConfiguration>.DataConnection

    Inheritance
    System.Object
    ShardSetsBase<TShard, TConfiguration>.DataConnection
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ArgentSea
    Assembly: ArgentSea.dll
    Syntax
    public class DataConnection

    Properties

    | Improve this Doc View Source

    ConnectionString

    Declaration
    public string ConnectionString { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    LookupAsync<TValue>(String, DbParameterCollection, String, CancellationToken)

    Connect to the database and return a single value.

    Declaration
    public Task<TValue> LookupAsync<TValue>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the value.

    System.Data.Common.DbParameterCollection parameters

    A parameters collction. Input parameters may be used to find the parameter; will return the value of the first output (or input/output) parameter. If TValue is an int, will also return the sproc return value.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    System.Threading.CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TValue>

    The retrieved value.

    Type Parameters
    Name Description
    TValue

    The expected type of the return value.

    | Improve this Doc View Source

    LookupAsync<TValue>(String, DbParameterCollection, CancellationToken)

    Connect to the database and return a single value.

    Declaration
    public Task<TValue> LookupAsync<TValue>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the value.

    System.Data.Common.DbParameterCollection parameters

    A parameters collction. Input parameters may be used to find the parameter; will return the value of the first output (or input/output) parameter. If TValue is an int, will also return the sproc return value.

    System.Threading.CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<TValue>

    The retrieved value.

    Type Parameters
    Name Description
    TValue

    The expected type of the return value.

    | Improve this Doc View Source

    MapListAsync<TModel>(String, DbParameterCollection, String, CancellationToken)

    Connect to the database and return the values as a list of objects.

    Declaration
    public Task<IList<TModel>> MapListAsync<TModel>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    System.Threading.CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IList<TModel>>

    A list containing an object for each data row.

    Type Parameters
    Name Description
    TModel

    The type of object to be listed.

    | Improve this Doc View Source

    MapListAsync<TModel>(String, DbParameterCollection, CancellationToken)

    Connect to the database and return the values as a list of objects.

    Declaration
    public Task<IList<TModel>> MapListAsync<TModel>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.IList<TModel>>

    A list containing an object for each data row.

    Type Parameters
    Name Description
    TModel

    The type of object to be listed.

    | Improve this Doc View Source

    MapOutputAsync<TModel>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
        where TReaderResult2 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
        where TReaderResult2 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapOutputAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
        where TReaderResult2 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2>(String, 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>(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
        where TModel : class, new()
        where TReaderResult0 : class, new()
        where TReaderResult1 : class, new()
        where TReaderResult2 : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5>(String, 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>(string sprocName, 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
    System.String sprocName

    The stored procedure to call 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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    MapReaderAsync<TModel, TReaderResult0, TReaderResult1, TReaderResult2, TReaderResult3, TReaderResult4, TReaderResult5, TReaderResult6, TReaderResult7>(String, DbParameterCollection, String, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, 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
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    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.

    | Improve this Doc View Source

    QueryAsync<TModel>(String, DbParameterCollection, QueryResultModelHandler<TShard, Object, TModel>, Boolean, CancellationToken)

    Connect to the database and return the TModel object returned by the delegate.

    Declaration
    public Task<TModel> QueryAsync<TModel>(string sprocName, DbParameterCollection parameters, QueryResultModelHandler<TShard, object, TModel> resultHandler, bool isTopOne, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    QueryResultModelHandler<TShard, 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.

    | Improve this Doc View Source

    QueryAsync<TModel>(String, DbParameterCollection, String, QueryResultModelHandler<TShard, Object, TModel>, Boolean, CancellationToken)

    Connect to the database and return the TModel object returned by the delegate.

    Declaration
    public Task<TModel> QueryAsync<TModel>(string sprocName, DbParameterCollection parameters, string shardParameterName, QueryResultModelHandler<TShard, object, TModel> resultHandler, bool isTopOne, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    QueryResultModelHandler<TShard, 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.

    | Improve this Doc View Source

    QueryAsync<TArg, TModel>(String, DbParameterCollection, QueryResultModelHandler<TShard, 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>(string sprocName, DbParameterCollection parameters, QueryResultModelHandler<TShard, TArg, TModel> resultHandler, bool isTopOne, TArg optionalArgument, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    QueryResultModelHandler<TShard, 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

    An object of type TArg which can be used to pass non-datatabase data to the result-generating delegate.

    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.

    | Improve this Doc View Source

    QueryAsync<TArg, TModel>(String, DbParameterCollection, String, QueryResultModelHandler<TShard, 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>(string sprocName, DbParameterCollection parameters, string shardParameterName, QueryResultModelHandler<TShard, TArg, TModel> resultHandler, bool isTopOne, TArg optionalArgument, CancellationToken cancellationToken)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure to call to fetch the data.

    System.Data.Common.DbParameterCollection parameters

    The query parameters.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    QueryResultModelHandler<TShard, 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

    An object of type TArg which can be used to pass non-datatabase data to the result-generating delegate.

    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.

    | Improve this Doc View Source

    RunAsync(String, DbParameterCollection, String, CancellationToken)

    Executes a database procedure or function that does not return a data result.

    Declaration
    public Task RunAsync(string sprocName, DbParameterCollection parameters, string shardParameterName, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure or function to call.

    System.Data.Common.DbParameterCollection parameters

    The query parameters with values set.

    System.String shardParameterName

    The ordinal position of a parameter that should be automatically set to the current shard number value. If there is no such parameter, set to -1.

    System.Threading.CancellationToken cancellationToken

    A token to cancel the asynchronous operation.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Throws an error if not successful.

    | Improve this Doc View Source

    RunAsync(String, DbParameterCollection, CancellationToken)

    Executes a database procedure or function that does not return a data result.

    Declaration
    public Task RunAsync(string sprocName, DbParameterCollection parameters, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String sprocName

    The stored procedure or function to call.

    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.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX