System.Data.Common.DbCommand.AddParameter(string, object)

Here are the examples of the csharp api class System.Data.Common.DbCommand.AddParameter(string, object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

View license
public static DatabaseCommand AddParameter( this DatabaseCommand databaseCommand, string parameterName, object parameterValue )
        {
            databaseCommand.DbCommand.AddParameter( parameterName, parameterValue );

            return databaseCommand;
        }

2. Example

View license
public static DbCommand AddParameters( this DbCommand dbCommand, IDictionary<string, object> parameterNameAndValueDictionary )
        {
            if ( parameterNameAndValueDictionary == null )
            {
                throw new ArgumentNullException( "parameterNameAndValueDictionary" );
            }

            foreach ( var parameterNameAndValue in parameterNameAndValueDictionary )
            {
                dbCommand.AddParameter( parameterNameAndValue.Key, parameterNameAndValue.Value );
            }

            return dbCommand;
        }

3. Example

View license
public static DbCommand AddParameters<T>( this DbCommand dbCommand, string parameterName, List/n ..... /n //View Source file for more details /n }

4. Example

View license
public static DbCommand GenerateInsertCommand( this DbCommand dbCommand, object obj, string sqlInser/n ..... /n //View Source file for more details /n }