C# Class Griffin.Data.CommandExtensions

Extensions for IDbCommand
ファイルを表示 Open project: jgauffin/Griffin.Framework Class Usage Examples

Public Methods

Method Description
AddParameter ( this command, string name, object value ) : IDataParameter

Add a parameter to a command

CreateDataException ( this cmd, Exception inner ) : DataException

Creates a DataException using the command text and sql parameters.

Method Details

AddParameter() public static method

Add a parameter to a command
public static AddParameter ( this command, string name, object value ) : IDataParameter
command this Command to add parameter to
name string Name of the parameter
value object Value (will be changed to DBNull.Value automatically if it's null).
return IDataParameter

CreateDataException() public static method

Creates a DataException using the command text and sql parameters.
public static CreateDataException ( this cmd, Exception inner ) : DataException
cmd this Command to build an exception from.
inner System.Exception Inner exception.
return System.Data.DataException