System.Data.Common.DbCommand.AddParams(params object[])

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

5 Examples 7

1. Example

Project: RawDataAccessBencher
Source File: Massive.cs
View license
DbCommand CreateCommand(string sql, DbConnection conn, params object[] args)
		{
			var result = _factory.CreateCommand();
			result.Connection = conn;
			result.CommandText = sql;
			if(args.Length > 0)
				result.AddParams(args);
			return result;
		}

2. Example

Project: ReliableDbProvider
Source File: Massive.cs
View license
DbCommand CreateCommand(string sql, DbConnection conn, params object[] args)
        {
            var result = _factory.CreateCommand();
            result.Connection = conn;
            result.CommandText = sql;
            if (args.Length > 0)
                result.AddParams(args);
            return result;
        }

3. Example

Project: NServiceKit.OrmLite
Source File: Massive.cs
View license
DbCommand CreateCommand(string sql, DbConnection conn, params object[] args)
        {
            var result = _factory.CreateCommand();
            result.Connection = conn;
            result.CommandText = sql;
            if (args.Length > 0)
                result.AddParams(args);
            return result;
        }

4. Example

Project: Ilaro.Admin
Source File: Massive.cs
View license
DbCommand CreateCommand(string sql, DbConnection conn, params object[] args)
        {
            var result = _factory.CreateCommand();
            result.Connection = conn;
            result.CommandText = sql;
            if (args.Length > 0)
                result.AddParams(args);
            return result;
        }

5. Example

Project: RawDataAccessBencher
Source File: Massive.cs
View license
DbCommand CreateCommand(string sql, DbConnection conn, params object[] args)
        {
            var newArgs = ToParams(args);
            var result = _factory.CreateCommand();
            result.Connection = conn;
            result.CommandText = sql;
            if (args.Length > 0)
                result.AddParams(newArgs);
            return result;
        }