SqlMapperQuery Method (IDbConnection, String, Object, NullableCommandType) |
Return a list of dynamic objects, reader is closed after the call
Namespace: DapperAssembly: VirtualRadar.Database (in VirtualRadar.Database.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static IEnumerable<IDictionary<string, Object>> Query(
this IDbConnection cnn,
string sql,
Object param,
Nullable<CommandType> commandType
)
<ExtensionAttribute>
Public Shared Function Query (
cnn As IDbConnection,
sql As String,
param As Object,
commandType As Nullable(Of CommandType)
) As IEnumerable(Of IDictionary(Of String, Object))
public:
[ExtensionAttribute]
static IEnumerable<IDictionary<String^, Object^>^>^ Query(
IDbConnection^ cnn,
String^ sql,
Object^ param,
Nullable<CommandType> commandType
)
[<ExtensionAttribute>]
static member Query :
cnn : IDbConnection *
sql : string *
param : Object *
commandType : Nullable<CommandType> -> IEnumerable<IDictionary<string, Object>>
Parameters
- cnn
- Type: System.DataIDbConnection
- sql
- Type: SystemString
- param
- Type: SystemObject
- commandType
- Type: SystemNullableCommandType
Return Value
Type:
IEnumerableIDictionaryString,
ObjectUsage 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