Method AddParam
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
AddParam(Param)
Shortcut to add a parameter to the params list.
protected TThis AddParam(ExpressiveCommandBase<TConnection, TCommand, TReader, TDbType, TThis>.Param param)
Parameters
paramExpressiveCommandBase<TConnection, TCommand, TReader, TDbType, TThis>.Param
Returns
- TThis
AddParam(string, object, TDbType, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, object value, TDbType type, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
valueobjectThe value of the parameter.
typeTDbTypeThe database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, object?, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, object? value, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
valueobjectThe value of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam<T>(string, T?, TDbType?, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam<T>(string name, T? value, TDbType? type = null, ParameterDirection direction = ParameterDirection.Input) where T : struct
Parameters
namestringThe name of the parameter.
valueT?The value of the parameter.
typeTDbType?The database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Type Parameters
T
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, int, TDbType?, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, int value, TDbType? type = null, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
valueintThe value of the parameter.
typeTDbType?The database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, long, TDbType?, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, long value, TDbType? type = null, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
valuelongThe value of the parameter.
typeTDbType?The database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, string?, TDbType?, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, string? value, TDbType? type = null, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
valuestringThe value of the parameter.
typeTDbType?The database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, TDbType, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, TDbType type, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
typeTDbTypeThe database type of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.
AddParam(string, ParameterDirection)
Adds a parameter to the params list.
public TThis AddParam(string name, ParameterDirection direction = ParameterDirection.Input)
Parameters
namestringThe name of the parameter.
directionParameterDirectionThe direction of the parameter.
Returns
- TThis
This instance for use in method chaining.
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank.