SqlMapperExecuteScalarT Method (IDbConnection, CommandDefinition) |
Execute parameterized SQL that selects a single value
Namespace: DapperAssembly: VirtualRadar.Database (in VirtualRadar.Database.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static T ExecuteScalar<T>(
this IDbConnection cnn,
CommandDefinition command
)
<ExtensionAttribute>
Public Shared Function ExecuteScalar(Of T) (
cnn As IDbConnection,
command As CommandDefinition
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T ExecuteScalar(
IDbConnection^ cnn,
CommandDefinition command
)
[<ExtensionAttribute>]
static member ExecuteScalar :
cnn : IDbConnection *
command : CommandDefinition -> 'T
Parameters
- cnn
- Type: System.DataIDbConnection
- command
- Type: DapperCommandDefinition
Type Parameters
- T
Return Value
Type:
TThe first cell selected
Usage 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