SqlMapper Class |
Namespace: Dapper
The SqlMapper type exposes the following members.
Name | Description | |
---|---|---|
ConnectionStringComparer |
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.
|
Name | Description | |
---|---|---|
AddTypeHandler(Type, SqlMapperITypeHandler) |
Configure the specified type to be processed by a custom handler
| |
AddTypeHandlerT(SqlMapperTypeHandlerT) |
Configure the specified type to be processed by a custom handler
| |
AddTypeHandlerImpl |
Configure the specified type to be processed by a custom handler
| |
AddTypeMap |
Configure the specified type to be mapped to a given db-type
| |
AsListT |
Obtains the data as a list; if it is *already* a list, the original object is returned without
any duplication; otherwise, ToList() is invoked.
| |
AsTableValuedParameter |
Used to pass a DataTable as a TableValuedParameter
| |
CreateParamInfoGenerator |
Internal use only
| |
Execute(IDbConnection, CommandDefinition) |
Execute parameterized SQL
| |
Execute(IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType) |
Execute parameterized SQL
| |
ExecuteReader(IDbConnection, CommandDefinition) |
Execute parameterized SQL and return an IDataReader | |
ExecuteReader(IDbConnection, CommandDefinition, CommandBehavior) |
Execute parameterized SQL and return an IDataReader | |
ExecuteReader(IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType) |
Execute parameterized SQL and return an IDataReader | |
ExecuteScalar(IDbConnection, CommandDefinition) |
Execute parameterized SQL that selects a single value
| |
ExecuteScalar(IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType) |
Execute parameterized SQL that selects a single value
| |
ExecuteScalarT(IDbConnection, CommandDefinition) |
Execute parameterized SQL that selects a single value
| |
ExecuteScalarT(IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType) |
Execute parameterized SQL that selects a single value
| |
FindOrAddParameter | Obsolete.
Internal use only
| |
Format | Obsolete.
Convert numeric values to their string form for SQL literal purposes
| |
GetDbType | Obsolete.
Get the DbType that maps to a given value
| |
GetTypeDeserializer |
Internal use only
| |
GetTypeMap |
Gets type-map for the given type
| |
GetTypeName |
Fetch the type name associated with a DataTable
| |
PackListParameters | Obsolete.
Internal use only
| |
PurgeQueryCache |
Purge the query cache
| |
Query(IDbConnection, String, Object) |
Return a list of dynamic objects, reader is closed after the call
| |
Query(IDbConnection, String, Object, IDbTransaction) |
Return a list of dynamic objects, reader is closed after the call
| |
Query(IDbConnection, String, Object, NullableCommandType) |
Return a list of dynamic objects, reader is closed after the call
| |
Query(IDbConnection, String, Object, IDbTransaction, NullableCommandType) |
Return a list of dynamic objects, reader is closed after the call
| |
Query(IDbConnection, String, Object, IDbTransaction, Boolean, NullableInt32, NullableCommandType) |
Return a list of dynamic objects, reader is closed after the call
| |
Query(IDbConnection, Type, String, Object, IDbTransaction, Boolean, NullableInt32, NullableCommandType) |
Executes a query, returning the data typed as per the Type suggested
| |
QueryT(IDbConnection, CommandDefinition) |
Executes a query, returning the data typed as per T
| |
QueryT(IDbConnection, String, Object, IDbTransaction, Boolean, NullableInt32, NullableCommandType) |
Executes a query, returning the data typed as per T
| |
QueryTFirst, TSecond, TReturn(IDbConnection, String, FuncTFirst, TSecond, TReturn, Object, IDbTransaction, Boolean, String, NullableInt32, NullableCommandType) |
Maps a query to objects
| |
QueryTFirst, TSecond, TThird, TReturn(IDbConnection, String, FuncTFirst, TSecond, TThird, TReturn, Object, IDbTransaction, Boolean, String, NullableInt32, NullableCommandType) |
Maps a query to objects
| |
QueryTFirst, TSecond, TThird, TFourth, TReturn(IDbConnection, String, FuncTFirst, TSecond, TThird, TFourth, TReturn, Object, IDbTransaction, Boolean, String, NullableInt32, NullableCommandType) |
Perform a multi mapping query with 4 input parameters
| |
QueryMultiple(IDbConnection, CommandDefinition) |
Execute a command that returns multiple result sets, and access each in turn
| |
QueryMultiple(IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType) |
Execute a command that returns multiple result sets, and access each in turn
| |
ReadChar | Obsolete.
Internal use only
| |
ReadNullableChar | Obsolete.
Internal use only
| |
ReplaceLiterals |
Replace all literal tokens with their text form
| |
ResetTypeHandlers |
Clear the registered type handlers
| |
SetTypeMap |
Set custom mapping for type deserializers
| |
SetTypeName |
Associate a DataTable with a type name
| |
ThrowDataException | Obsolete.
Throws a data exception, only used internally
|
Name | Description | |
---|---|---|
QueryCachePurged |
Called if the query cache is purged via PurgeQueryCache
|