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

1 Example 7

1. Example

Project: nhibernate-core
Source File: DriverBase.cs
View license
public void RemoveUnusedCommandParameters(DbCommand cmd, SqlString sqlString)
			if (!UseNamedPrefixInSql)
				return; // Applicable only to named parameters

			var formatter = GetSqlStringFormatter();
			var assignedParameterNames = new HashSet<string>(formatter.AssignedParameterNames);

				.Select(p => p.ParameterName)
				.Where(p => !assignedParameterNames.Contains(UseNamedPrefixInParameter ? p : FormatNameForSql(p)))
				.ForEach(unusedParameterName => cmd.Parameters.RemoveAt(unusedParameterName));