Dapper Represents the key aspects of a sql operation The command (sql or a stored-procedure name) to execute The parameters associated with the command The active transaction for the command The effective timeout for the command The type of command that the command-text represents Should data be buffered before returning? Should the plan for this query be cached? Additional state flags against this command Can async queries be pipelined? Initialize the command definition The text for this command. The parameters for this command. The transaction for this command to participate in. The timeout (in seconds) for this command. The for this command. The behavior flags for this command. The cancellation token for this command. For asynchronous operations, the cancellation-token Additional state flags that control command behaviour No additional flags Should data be buffered before returning? Can async queries be pipelined? Should the plan cache be bypassed? Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping) Creates custom property mapping Target entity type Property selector based on target type and DataReader column name Always returns default constructor DataReader column names DataReader column types Default constructor Always returns null Not implemented as far as default constructor used for all cases Returns property based on selector strategy DataReader column name Poperty member map This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar Default value for IsAnsi. A value to set the default value of strings going through Dapper. Default is 4000, any value larger than this field will not have the default value applied. Create a new DbString Ansi vs Unicode Fixed length Length of the string -1 for max The value of the string Add the parameter to the command... internal use only Represents default type mapping strategy used by Dapper Creates default type map Entity type Finds best constructor DataReader column names DataReader column types Matching constructor or default one Returns the constructor, if any, that has the ExplicitConstructorAttribute on it. Gets mapping for constructor parameter Constructor to resolve DataReader column name Mapping implementation Gets member mapping for column DataReader column name Mapping implementation Should column names like User_Id be allowed to match properties/fields like UserId ? The settable properties for this typemap A bag of parameters that can be passed to the Dapper Query and Execute methods construct a dynamic parameter bag construct a dynamic parameter bag can be an anonymous type or a DynamicParameters bag Append a whole object full of params to the dynamic EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic Add a parameter to this dynamic parameter list. The name of the parameter. The value of the parameter. The type of the parameter. The in or out direction of the parameter. The size of the parameter. Add a parameter to this dynamic parameter list. The name of the parameter. The value of the parameter. The type of the parameter. The in or out direction of the parameter. The size of the parameter. The precision of the parameter. The scale of the parameter. If true, the command-text is inspected and only values that are clearly used are included on the connection Add all the parameters needed to the command just before it executes The raw command prior to execution Information about the query All the names of the param in the bag, use Get to yank them out Get the value of a parameter The value, note DBNull.Value is not returned, instead the value is returned as null Allows you to automatically populate a target property/field from output parameters. It actually creates an InputOutput parameter, so you can still pass data in. The object whose property/field you wish to populate. A MemberExpression targeting a property/field of the target (or descendant thereof.) The size to set on the parameter. Defaults to 0, or DbString.DefaultLength in case of strings. The DynamicParameters instance Tell Dapper to use an explicit constructor, passing nulls or 0s for all parameters Creates a with a less specific generic parameter that perfectly mirrors the state of the specified . Handles variances in features per DBMS Gets the feature set based on the passed connection The connection to get supported features for. True if the db supports array columns e.g. Postgresql Represents simple member map for one of target parameter or property or field to source DataReader column Creates instance for simple property mapping DataReader column name Target property Creates instance for simple field mapping DataReader column name Target property Creates instance for simple constructor parameter mapping DataReader column name Target constructor parameter DataReader column name Target member type Target property Target field Target constructor parameter Used to pass a IEnumerable<SqlDataRecord> as a SqlDataRecordListTVPParameter Create a new instance of . The data records to convert into TVPs. The parameter type name. Dapper, a light weight object mapper for ADO.NET Execute a query asynchronously using Task. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a query asynchronously using Task. The connection to query on. The command used to query on this connection. Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a single-row query asynchronously using Task. The connection to query on. The command used to query on this connection. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a single-row query asynchronously using Task. The connection to query on. The command used to query on this connection. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a single-row query asynchronously using Task. The connection to query on. The command used to query on this connection. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a single-row query asynchronously using Task. The connection to query on. The command used to query on this connection. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Execute a query asynchronously using Task. The type of results to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. A sequence of data of ; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Execute a single-row query asynchronously using Task. The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The type to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a single-row query asynchronously using Task. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Execute a query asynchronously using Task. The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. Execute a query asynchronously using Task. The type to return. The connection to query on. The command used to query on this connection. A sequence of data of ; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Execute a query asynchronously using Task. The connection to query on. The type to return. The command used to query on this connection. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The command used to query on this connection. Execute a single-row query asynchronously using Task. The type to return. The connection to query on. The command used to query on this connection. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The command used to query on this connection. Execute a single-row query asynchronously using Task. The type to return. The connection to query on. The command used to query on this connection. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The command used to query on this connection. Execute a single-row query asynchronously using Task. The type to return. The connection to query on. The command used to query on this connection. Execute a single-row query asynchronously using Task. The connection to query on. The type to return. The command used to query on this connection. Execute a single-row query asynchronously using Task. The type to return. The connection to query on. The command used to query on this connection. Attempts to open a connection asynchronously, with a better error message for unsupported usages. Attempts setup a on a , with a better error message for unsupported usages. Execute a command asynchronously using Task. The connection to query on. The SQL to execute for this query. The parameters to use for this query. The transaction to use for this query. Number of seconds before command execution timeout. Is it a stored proc or a batch? The number of rows affected. Execute a command asynchronously using Task. The connection to execute on. The command to execute on this connection. The number of rows affected. Perform a asynchronous multi-mapping query with 2 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a asynchronous multi-mapping query with 2 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with 3 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a asynchronous multi-mapping query with 3 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with 4 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a asynchronous multi-mapping query with 4 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with 5 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a asynchronous multi-mapping query with 5 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with 6 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a asynchronous multi-mapping query with 6 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with 7 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The seventh type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform an asynchronous multi-mapping query with 7 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The seventh type in the recordset. The combined type to return. The connection to query on. The field we should split and read the second object from (default: "Id"). The command to execute. The function to map row types to the return type. An enumerable of . Perform a asynchronous multi-mapping query with an arbitrary number of input types. This returns a single type, combined from the raw types via . The combined type to return. The connection to query on. The SQL to execute for this query. Array of types in the recordset. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Execute a command that returns multiple result sets, and access each in turn. The connection to query on. The SQL to execute for this query. The parameters to use for this query. The transaction to use for this query. Number of seconds before command execution timeout. Is it a stored proc or a batch? Execute a command that returns multiple result sets, and access each in turn. The connection to query on. The command to execute for this query. Execute parameterized SQL and return an . The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Execute parameterized SQL and return a . The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? Execute parameterized SQL and return an . The connection to execute on. The command to execute. An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Execute parameterized SQL and return a . The connection to execute on. The command to execute. Execute parameterized SQL and return an . The connection to execute on. The command to execute. The flags for this reader. An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Execute parameterized SQL and return a . The connection to execute on. The command to execute. The flags for this reader. Execute parameterized SQL that selects a single value. The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? The first cell returned, as . Execute parameterized SQL that selects a single value. The type to return. The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? The first cell returned, as . Execute parameterized SQL that selects a single value. The connection to execute on. The command to execute. The first cell selected as . Execute parameterized SQL that selects a single value The type to return. The connection to execute on. The command to execute. The first cell selected as . Called if the query cache is purged via PurgeQueryCache Purge the query cache Return a count of all the cached queries by Dapper Return a list of all the queries cached by Dapper Deep diagnostics only: find any hash collisions in the cache Clear the registered type handlers. Configure the specified type to be mapped to a given db-type. The type to map from. The database type to map to. Removes the specified type from the Type/DbType mapping table. The type to remove from the current map. Configure the specified type to be processed by a custom handler. The type to handle. The handler to process the . Configure the specified type to be processed by a custom handler. The type to handle. The handler to process the . Whether to clone the current type handler map. Configure the specified type to be processed by a custom handler. The type to handle. The handler for the type . Get the DbType that maps to a given value. The object to get a corresponding database type for. OBSOLETE: For internal usage only. Lookup the DbType and handler for a given Type and member The type to lookup. The name (for error messages). Whether to demand a value (throw if missing). The handler for . Obtains the data as a list; if it is *already* a list, the original object is returned without any duplication; otherwise, ToList() is invoked. The type of element in the list. The enumerable to return as a list. Execute parameterized SQL. The connection to query on. The SQL to execute for this query. The parameters to use for this query. The transaction to use for this query. Number of seconds before command execution timeout. Is it a stored proc or a batch? The number of rows affected. Execute parameterized SQL. The connection to execute on. The command to execute on this connection. The number of rows affected. Execute parameterized SQL that selects a single value. The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? The first cell selected as . Execute parameterized SQL that selects a single value. The type to return. The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? The first cell returned, as . Execute parameterized SQL that selects a single value. The connection to execute on. The command to execute. The first cell selected as . Execute parameterized SQL that selects a single value. The type to return. The connection to execute on. The command to execute. The first cell selected as . Execute parameterized SQL and return an . The connection to execute on. The SQL to execute. The parameters to use for this command. The transaction to use for this command. Number of seconds before command execution timeout. Is it a stored proc or a batch? An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Execute parameterized SQL and return an . The connection to execute on. The command to execute. An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Execute parameterized SQL and return an . The connection to execute on. The command to execute. The flags for this reader. An that can be used to iterate over the results of the SQL query. This is typically used when the results of a query are not processed by Dapper, for example, used to fill a or . Return a sequence of dynamic objects with properties matching the columns. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. Whether to buffer the results in memory. The command timeout (in seconds). The type of command to execute. Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Return a dynamic object with properties matching the columns. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Return a dynamic object with properties matching the columns. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Return a dynamic object with properties matching the columns. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Return a dynamic object with properties matching the columns. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Executes a query, returning the data typed as . The type of results to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. Whether to buffer results in memory. The command timeout (in seconds). The type of command to execute. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The type of result to return. The connection to query on. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. Whether to buffer results in memory. The command timeout (in seconds). The type of command to execute. is null. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a single-row query, returning the data typed as . The connection to query on. The type to return. The SQL to execute for the query. The parameters to pass, if any. The transaction to use, if any. The command timeout (in seconds). The type of command to execute. is null. A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a query, returning the data typed as . The type of results to return. The connection to query on. The command used to query on this connection. A sequence of data of ; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a query, returning the data typed as . The type of results to return. The connection to query on. The command used to query on this connection. A single instance or null of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a query, returning the data typed as . The type of results to return. The connection to query on. The command used to query on this connection. A single or null instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a query, returning the data typed as . The type of results to return. The connection to query on. The command used to query on this connection. A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Executes a query, returning the data typed as . The type of results to return. The connection to query on. The command used to query on this connection. A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is created per row, and a direct column-name===member-name mapping is assumed (case insensitive). Execute a command that returns multiple result sets, and access each in turn. The connection to query on. The SQL to execute for this query. The parameters to use for this query. The transaction to use for this query. Number of seconds before command execution timeout. Is it a stored proc or a batch? Execute a command that returns multiple result sets, and access each in turn. The connection to query on. The command to execute for this query. Perform a multi-mapping query with 2 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with 3 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with 4 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with 5 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with 6 input types. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with 7 input types. If you need more types -> use Query with Type[] parameter. This returns a single type, combined from the raw types via . The first type in the recordset. The second type in the recordset. The third type in the recordset. The fourth type in the recordset. The fifth type in the recordset. The sixth type in the recordset. The seventh type in the recordset. The combined type to return. The connection to query on. The SQL to execute for this query. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Perform a multi-mapping query with an arbitrary number of input types. This returns a single type, combined from the raw types via . The combined type to return. The connection to query on. The SQL to execute for this query. Array of types in the recordset. The function to map row types to the return type. The parameters to use for this query. The transaction to use for this query. Whether to buffer the results in memory. The field we should split and read the second object from (default: "Id"). Number of seconds before command execution timeout. Is it a stored proc or a batch? An enumerable of . Internal use only. The object to convert to a character. Internal use only. The object to convert to a character. Internal use only. The parameter collection to search in. The command for this fetch. The name of the parameter to get. Internal use only. The command to pack parameters for. The name prefix for these parameters. The parameter value can be an OBSOLETE: For internal usage only. Sanitizes the paramter value with proper type casting. The value to sanitize. Replace all literal tokens with their text form. The parameter lookup to do replacements with. The command to repalce parameters in. Convert numeric values to their string form for SQL literal purposes. The value to get a string for. Internal use only. The identity of the generator. Whether to check for duplicates. Whether to remove unused parameters. Gets type-map for the given type Type map instance, default is to create new instance of DefaultTypeMap Gets type-map for the given . The type to get a map for. Type map implementation, DefaultTypeMap instance if no override present Set custom mapping for type deserializers Entity type to override Mapping rules impementation, null to remove custom map Internal use only Throws a data exception, only used internally The exception to throw. The index the exception occured at. The reader the exception occured in. The value that caused the exception. How should connection strings be compared for equivalence? Defaults to StringComparer.Ordinal. Providing a custom implementation can be useful for allowing multi-tenancy databases with identical schema to share strategies. Note that usual equivalence rules apply: any equivalent connection strings MUST yield the same hash-code. Key used to indicate the type name associated with a DataTable. Used to pass a DataTable as a . The to create this parameter for. The name of the type this parameter is for. Associate a DataTable with a type name. The that does with the . The name of the type this table is for. Fetch the type name associated with a . The that has a type name associated with it. Used to pass a IEnumerable<SqlDataRecord> as a TableValuedParameter. The list of records to convert to TVPs. The sql parameter type name. Dummy type for excluding from multi-map The grid reader provides interfaces for reading multiple result sets from a Dapper query Read the next grid of results, returned as a dynamic object Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Whether to buffer the results. Read an individual row of the next grid of results, returned as a dynamic object Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read the next grid of results The type to read. Whether to buffer the results. is null. Read an individual row of the next grid of results The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read the next grid of results. The type to read. Whether the results should be buffered in memory. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read the next grid of results, returned as a dynamic object. Whether the results should be buffered in memory. Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read an individual row of the next grid of results, returned as a dynamic object. Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> Read the next grid of results. The type to read. Whether the results should be buffered in memory. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read an individual row of the next grid of results. The type to read. Read the next grid of results. The type to read. Whether to buffer the results. is null. Read an individual row of the next grid of results. The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read an individual row of the next grid of results. The type to read. is null. Read multiple objects from a single record set on the grid. The first type in the record set. The second type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid. The first type in the record set. The second type in the record set. The third type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid The first type in the record set. The second type in the record set. The third type in the record set. The fourth type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid The first type in the record set. The second type in the record set. The third type in the record set. The fourth type in the record set. The fifth type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid The first type in the record set. The second type in the record set. The third type in the record set. The fourth type in the record set. The fifth type in the record set. The sixth type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid The first type in the record set. The second type in the record set. The third type in the record set. The fourth type in the record set. The fifth type in the record set. The sixth type in the record set. The seventh type in the record set. The type to return from the record set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Read multiple objects from a single record set on the grid The type to return from the record set. The types to read from the result set. The mapping function from the read types to the return type. The field(s) we should split and read the second object from (defaults to "id") Whether to buffer results in memory. Has the underlying reader been consumed? The command associated with the reader Dispose the grid, closing and disposing both the underlying reader and command. Implement this interface to pass an arbitrary db specific parameter to Dapper Add the parameter needed to the command before it executes The raw command prior to execution Parameter name Parses a data reader to a sequence of data of the supplied type. Used for deserializing a reader without a connection, etc. The type to parse from the . The data reader to parse results from. Parses a data reader to a sequence of data of the supplied type (as object). Used for deserializing a reader without a connection, etc. The data reader to parse results from. The type to parse from the . Parses a data reader to a sequence of dynamic. Used for deserializing a reader without a connection, etc. The data reader to parse results from. Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. You could return a collection of the base type but have each more specific. The data reader to get the parser for the current row from The type to get the parser for The start column index of the object (default 0) The length of columns to read (default -1 = all fields following startIndex) Return null if we can't find the first column? (default false) A parser for this specific object from this row. Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. You could return a collection of the base type but have each more specific. The type of results to return. The data reader to get the parser for the current row from. The type to get the parser for. The start column index of the object (default: 0). The length of columns to read (default: -1 = all fields following startIndex). Return null if we can't find the first column? (default: false). A parser for this specific object from this row. var result = new List<BaseType>(); using (var reader = connection.ExecuteReader(@" select 'abc' as Name, 1 as Type, 3.0 as Value union all select 'def' as Name, 2 as Type, 4.0 as Value")) { if (reader.Read()) { var toFoo = reader.GetRowParser<BaseType>(typeof(Foo)); var toBar = reader.GetRowParser<BaseType>(typeof(Bar)); var col = reader.GetOrdinal("Type"); do { switch (reader.GetInt32(col)) { case 1: result.Add(toFoo(reader)); break; case 2: result.Add(toBar(reader)); break; } } while (reader.Read()); } } abstract class BaseType { public abstract int Type { get; } } class Foo : BaseType { public string Name { get; set; } public override int Type => 1; } class Bar : BaseType { public float Value { get; set; } public override int Type => 2; } Identity of a cached query in Dapper, used for extensibility. Create an identity for use with DynamicParameters, internal use only. The parameters type to create an for. Whether this equals another. The other to compare to. The raw SQL command. The SQL command type. The hash code of this Identity. The grid index (position in the reader) of this Identity. This of this Identity. The connection string for this Identity. The type of the parameters object for this Identity. Gets the hash code for this identity. See object.ToString() Compare 2 Identity objects The other object to compare. Whether the two are equal Implement this interface to pass an arbitrary db specific set of parameters to Dapper Add all the parameters needed to the command just before it executes The raw command prior to execution Information about the query Implements this interface to provide custom member mapping Source DataReader column name Target member type Target property Target field Target constructor parameter Extends IDynamicParameters with facilities for executing callbacks after commands have completed Invoked when the command has executed Extends IDynamicParameters providing by-name lookup of parameter values Get the value of the specified parameter (return null if not found) The name of the parameter to get. Implement this interface to perform custom type-based parameter handling and value parsing Assign the value of a parameter before a command executes The parameter to configure Parameter value Parse a database value back to a typed value The value from the database The type to parse to The typed value Implement this interface to change default mapping of reader columns to type members Finds best constructor DataReader column names DataReader column types Matching constructor or default one Returns a constructor which should *always* be used. Parameters will be default values, nulls for reference types and zero'd for value types. Use this class to force object creation away from parameterless constructors you don't control. Gets mapping for constructor parameter Constructor to resolve DataReader column name Mapping implementation Gets member mapping for column DataReader column name Mapping implementation This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** equality. The type is fully thread-safe. The type to cache. The value type of the cache. Represents a placeholder for a value that should be replaced as a literal value in the resulting sql The text in the original command that should be replaced The name of the member referred to by the token Permits specifying certain SqlMapper values globally. Gets or sets whether Dapper should use the CommandBehavior.SingleResult optimization Note that a consequence of enabling this option is that errors that happen after the first select may not be reported Gets or sets whether Dapper should use the CommandBehavior.SingleRow optimization Note that on some DB providers this optimization can have adverse performance impact Resets all Settings to their default values Specifies the default Command Timeout for all Queries Indicates whether nulls in data are silently ignored (default) vs actively applied and assigned to members Should list expansions be padded with null-valued parameters, to prevent query-plan saturation? For example, an 'in @foo' expansion with 7, 8 or 9 values will be sent as a list of 10 values, with 3, 2 or 1 of them null. The padding size is relative to the size of the list; "next 10" under 150, "next 50" under 500, "next 100" under 1500, etc. Caution: this should be treated with care if your DB provider (or the specific configuration) allows for null equality (aka "ansi nulls off"), as this may change the intent of your query; as such, this is disabled by default and must be enabled. If set (non-negative), when performing in-list expansions of integer types ("where id in @ids", etc), switch to a string_split based operation if there are more than this many elements. Note that this feautre requires SQL Server 2016 / compatibility level 130 (or above). Base-class for simple type-handlers This this handler is for. Assign the value of a parameter before a command executes The parameter to configure Parameter value Parse a database value back to a typed value The value from the database The typed value Base-class for simple type-handlers that are based around strings This this handler is for. Parse a string into the expected type (the string will never be null) The string to parse. Format an instace into a string (the instance will never be null) The string to format. Assign the value of a parameter before a command executes The parameter to configure Parameter value Parse a database value back to a typed value The value from the database The typed value Not intended for direct usage The type to have a cache for. Not intended for direct usage. The object to parse. Not intended for direct usage. The parameter to set a value for. The value to set. A type handler for data-types that are supported by the underlying provider, but which need a well-known UdtTypeName to be specified Creates a new instance of UdtTypeHandler with the specified . The user defined type name. Used to pass a DataTable as a TableValuedParameter Create a new instance of . The to create this parameter for Create a new instance of . The to create this parameter for. The name of the type this parameter is for. Describes a reader that controls the lifetime of both a command and a reader, exposing the downstream command/reader as properties. Obtain the underlying reader Obtain the underlying command