Simplify the creation of an IDbCommand object by allowing
a stored procedure and optional parameters to be provided
Namespace: CodeSmith.EngineAssembly: CodeSmith.Engine (in CodeSmith.Engine.dll) Version: 6.0.0.0 (7.0.0.15127)
Syntax
C# |
---|
public virtual IDbCommand CreateCommand(
IDbConnection connection,
string spName,
params string[] sourceColumns
) |
Visual Basic |
---|
Public Overridable Function CreateCommand (
connection As IDbConnection,
spName As String,
ParamArray sourceColumns As String()
) As IDbCommand |
Return Value
Type:
IDbCommandA valid IDbCommand object
Examples
| Copy |
---|
IDbCommand command = helper.CreateCommand(conn, "AddCustomer", "CustomerID", "CustomerName"); |
Exceptions
See Also