Creates and returns a
IDbCommand object associated with the connection.
Namespace: System.Extensions.DataAssembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)
Syntax
C# |
---|
public static IDbCommand CreateCommand(
this IDbConnection connection,
string commandText,
CommandType commandType
) |
Visual Basic |
---|
<ExtensionAttribute>
Public Shared Function CreateCommand (
connection As IDbConnection,
commandText As String,
commandType As CommandType
) As IDbCommand |
Visual C++ |
---|
public:
[ExtensionAttribute]
static IDbCommand^ CreateCommand(
IDbConnection^ connection,
String^ commandText,
CommandType commandType
) |
F# |
---|
static member CreateCommand :
connection : IDbConnection *
commandText : string *
commandType : CommandType -> IDbCommand
|
Return Value
Type:
IDbCommandAn
IDbCommand object associated with the connection.
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