DbConnectionExtensionsCreateCommand Method
Creates and returns a DbCommand object associated with the current connection.
Namespace: DevCase.Extensions.DbConnectionExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static DbCommand CreateCommand(
this DbConnection connection,
string commandTextFormat,
params Object[] parameters
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function CreateCommand (
connection As DbConnection,
commandTextFormat As String,
ParamArray parameters As Object()
) As DbCommand
Dim connection As DbConnection
Dim commandTextFormat As String
Dim parameters As Object()
Dim returnValue As DbCommand
returnValue = connection.CreateCommand(commandTextFormat,
parameters)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static DbCommand^ CreateCommand(
DbConnection^ connection,
String^ commandTextFormat,
... array<Object^>^ parameters
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member CreateCommand :
connection : DbConnection *
commandTextFormat : string *
parameters : Object[] -> DbCommand
No code example is currently available or this language may not be supported.
- connection DbConnection
-
The source DbConnection.
- commandTextFormat String
-
The format of the text command to run against the data source.
- parameters Object
-
The names of the parameters.
DbCommand
The resulting
DbCommand object.
In Visual Basic and C#, you can call this method as an instance method on any object of type
DbConnection. 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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim connection As DbConnection = ...
Dim command As DbCommand = connection.CreateCommand("SELECT {0}", "Parameter0")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.