SqlMapperQueryTFirst, TSecond, TThird, TFourth, TReturn Method (IDbConnection, String, FuncTFirst, TSecond, TThird, TFourth, TReturn, Object, IDbTransaction, Boolean, String, NullableInt32, NullableCommandType) |
Perform a multi mapping query with 4 input parameters
Namespace: DapperAssembly: VirtualRadar.Database (in VirtualRadar.Database.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static IEnumerable<TReturn> Query<TFirst, TSecond, TThird, TFourth, TReturn>(
this IDbConnection cnn,
string sql,
Func<TFirst, TSecond, TThird, TFourth, TReturn> map,
Object param = null,
IDbTransaction transaction = null,
bool buffered = true,
string splitOn = "Id",
Nullable<int> commandTimeout = null,
Nullable<CommandType> commandType = null
)
<ExtensionAttribute>
Public Shared Function Query(Of TFirst, TSecond, TThird, TFourth, TReturn) (
cnn As IDbConnection,
sql As String,
map As Func(Of TFirst, TSecond, TThird, TFourth, TReturn),
Optional param As Object = Nothing,
Optional transaction As IDbTransaction = Nothing,
Optional buffered As Boolean = true,
Optional splitOn As String = "Id",
Optional commandTimeout As Nullable(Of Integer) = Nothing,
Optional commandType As Nullable(Of CommandType) = Nothing
) As IEnumerable(Of TReturn)
public:
[ExtensionAttribute]
generic<typename TFirst, typename TSecond, typename TThird, typename TFourth, typename TReturn>
static IEnumerable<TReturn>^ Query(
IDbConnection^ cnn,
String^ sql,
Func<TFirst, TSecond, TThird, TFourth, TReturn>^ map,
Object^ param = nullptr,
IDbTransaction^ transaction = nullptr,
bool buffered = true,
String^ splitOn = L"Id",
Nullable<int> commandTimeout = nullptr,
Nullable<CommandType> commandType = nullptr
)
[<ExtensionAttribute>]
static member Query :
cnn : IDbConnection *
sql : string *
map : Func<'TFirst, 'TSecond, 'TThird, 'TFourth, 'TReturn> *
?param : Object *
?transaction : IDbTransaction *
?buffered : bool *
?splitOn : string *
?commandTimeout : Nullable<int> *
?commandType : Nullable<CommandType>
(* Defaults:
let _param = defaultArg param null
let _transaction = defaultArg transaction null
let _buffered = defaultArg buffered true
let _splitOn = defaultArg splitOn "Id"
let _commandTimeout = defaultArg commandTimeout null
let _commandType = defaultArg commandType null
*)
-> IEnumerable<'TReturn>
Parameters
- cnn
- Type: System.DataIDbConnection
- sql
- Type: SystemString
- map
- Type: SystemFuncTFirst, TSecond, TThird, TFourth, TReturn
- param (Optional)
- Type: SystemObject
- transaction (Optional)
- Type: System.DataIDbTransaction
- buffered (Optional)
- Type: SystemBoolean
- splitOn (Optional)
- Type: SystemString
- commandTimeout (Optional)
- Type: SystemNullableInt32
- commandType (Optional)
- Type: SystemNullableCommandType
Type Parameters
- TFirst
- TSecond
- TThird
- TFourth
- TReturn
Return Value
Type:
IEnumerableTReturnUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDbConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also