System.Data.Common.DbParameterCollection.Insert(int, object)

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

3 Examples 7

1. Example

Project: effort
Source File: EffortCommandBase.cs
View license
protected void AddParameter(string name)
            EffortParameter parameter = new EffortParameter();
            parameter.ParameterName = name;

            this.Parameters.Insert(0, parameter);

2. Example

Project: AntData.ORM
Source File: Database.cs
View license
private DbCommand PrepareCommand(Statement statement)
            DbCommand command = m_Da/n ..... /n //View Source file for more details /n }

3. Example

View license
protected override void OnBeforePrepare(DbCommand command)

			// need to explicitly turn on named parameter binding
			_commandBindByNameSetter(command, true);

			var detail = CallableParser.Parse(command.CommandText);

			if (!detail.IsCallable)

			command.CommandType = CommandType.StoredProcedure;
			command.CommandText = detail.FunctionName;
			_commandBindByNameSetter(command, false);

			var outCursor = command.CreateParameter();
			_parameterOracleDbTypeSetter(outCursor, _oracleDbTypeRefCursor);

			outCursor.Direction = detail.HasReturn ? ParameterDirection.ReturnValue : ParameterDirection.Output;

			command.Parameters.Insert(0, outCursor);