DataExtensionsPopulateParametersTDbCommand(TDbCommand, ActionTDbCommand, Object) Method

Takes the DbCommand object and populates it with the given parameters.

Definition

Namespace: Gemstone.Data.DataExtensions
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.169 -- Release Build+adcc694938ddb0c37a2b1414eab017f00bb57688
public static void PopulateParameters<TDbCommand>(
	this TDbCommand command,
	Action<TDbCommand> deriveParameters,
	Object?[]? values
)
where TDbCommand : DbCommand

Parameters

command  TDbCommand
The DbCommand whose parameters are to be populated.
deriveParameters  ActionTDbCommand
The DeriveParameters() implementation of the command to use to populate parameters.
values  Object
The parameter values to populate the DbCommand parameters with.

Type Parameters

TDbCommand
Then DbCommand type to be used.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TDbCommand. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentException Number of DbParameter arguments in CommandText of this command, identified by '@', do not match number of supplied parameter values -or- You have supplied more values than parameters listed for the stored procedure.

See Also