Show / Hide Table of Contents

    Delegate QueryResultModelHandler<TShard, TArg, TModel>

    This delegate will be invoked for each shard (probably on different threads) to convert the cmd.Execute result to model types.

    Namespace: ArgentSea
    Assembly: ArgentSea.dll
    Syntax
    public delegate TModel QueryResultModelHandler<TShard, TArg, TModel>(TShard shardId, string sprocName, TArg optionalArgument, DbDataReader rdr, DbParameterCollection parameters, string connectionDescription, ILogger logger)
        where TShard : IComparable where TModel : class, new();
    Parameters
    Type Name Description
    TShard shardId

    The value of the Shard Number.

    System.String sprocName

    Used to uniquely identify any cached Expression Trees (along with TModel type) and also included in any logging information.

    TArg optionalArgument
    System.Data.Common.DbDataReader rdr

    A data reader instance supplied by the data provider when a query is executed.

    System.Data.Common.DbParameterCollection parameters

    An output parameter set supplied by the data provider when a query is executed.

    System.String connectionDescription

    Provides any logging writes with connection information to help troubleshoot any errors.

    Microsoft.Extensions.Logging.ILogger logger

    A logger instance for writing logs.

    Returns
    Type Description
    TModel

    An object of the defined type.

    Type Parameters
    Name Description
    TShard

    The Type of the ShardId.

    TArg

    The Type of an optional parameter that can be passed to the parsing function. If not used, simply use Type "object" and pass null if required.

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