Dapper
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?
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
Dapper, a light weight object mapper for ADO.NET
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
Extends IDynamicParameters providing by-name lookup of parameter values
Get the value of the specified parameter (return null if not found)
Extends IDynamicParameters with facilities for executing callbacks after commands have completed
Invoked when the command has executed
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
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
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 UdtTypeName
Base-class for simple type-handlers
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
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
Implements this interface to provide custom member mapping
Source DataReader column name
Target member type
Target property
Target field
Target constructor parameter
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.
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
Configure the specified type to be processed by a custom handler
Configure the specified type to be processed by a custom handler
Configure the specified type to be processed by a custom handler
Not intended for direct usage
Not intended for direct usage
Not intended for direct usage
Get the DbType that maps to a given value
Identity of a cached query in Dapper, used for extensibility
Create an identity for use with DynamicParameters, internal use only
The sql
The command type
Compare 2 Identity objects
Obtains the data as a list; if it is *already* a list, the original object is returned without
any duplication; otherwise, ToList() is invoked.
Execute parameterized SQL
Number of rows affected
Execute parameterized SQL
Number of rows affected
Execute parameterized SQL that selects a single value
The first cell selected
Execute parameterized SQL that selects a single value
The first cell selected
Execute parameterized SQL that selects a single value
The first cell selected
Execute parameterized SQL that selects a single value
The first cell selected
Execute parameterized SQL and return an
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
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
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 list of dynamic objects, reader is closed after the call
Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object>
Executes a query, returning the data typed as per T
the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
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 per the Type suggested
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 per T
the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
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).
Execute a command that returns multiple result sets, and access each in turn
Execute a command that returns multiple result sets, and access each in turn
Maps a query to objects
The first type in the record set
The second type in the record set
The return type
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?
Maps a query to objects
The Field we should split and read the second object from (default: id)
Number of seconds before command execution timeout
Perform a multi mapping query with 4 input parameters
Perform a multi mapping query with 5 input parameters
Perform a multi mapping query with 6 input parameters
Perform a multi mapping query with 7 input parameters
Perform a multi mapping query with arbitrary input parameters
The return type
array of types in the record set
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?
Internal use only
Internal use only
Internal use only
Internal use only
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
Replace all literal tokens with their text form
Convert numeric values to their string form for SQL literal purposes
Internal use only
Gets type-map for the given type
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
Key used to indicate the type name associated with a DataTable
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.
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>
Read the next grid of results
Read the next grid of results
Read multiple objects from a single record set on the grid
Read multiple objects from a single record set on the grid
Read multiple objects from a single record set on the grid
Read multiple objects from a single record set on the grid
Read multiple objects from a single record set on the grid
Read multiple objects from a single record set on the grid
Has the underlying reader been consumed?
Dispose the grid, closing and disposing both the underlying reader and command.
Used to pass a DataTable as a TableValuedParameter
Associate a DataTable with a type name
Fetch the type name associated with a DataTable
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
Add a parameter to this dynamic parameter list
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
Used to pass a DataTable as a TableValuedParameter
Create a new instance of TableValuedParameter
Create a new instance of TableValuedParameter
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
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
Handles variances in features per DBMS
Gets the feature set based on the passed connection
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
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 ?
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
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
Tell Dapper to use an explicit constructor, passing nulls or 0s for all parameters