Table of Contents

Method AddParams

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.MSSqlClient.dll

AddParams(SqlCommand)

Adds the command's parameters to a new SqlCommand.

protected override void AddParams(SqlCommand command)

Parameters

command SqlCommand

The command to add the parameters to.

Remarks

A parameter that has a value is added with it, so the provider infers the type from the value. A parameter that has no value (an output or return-value parameter) is still added, so that it reaches the command. The direction is applied, and the database type when one was given; otherwise a database null that came from an argument of a static type is sent with the DbType of that argument, as a null carries no type of its own.

Exceptions

ArgumentNullException

command is null.