Table of Contents

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

param ExpressiveCommandBase<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

name string

The name of the parameter.

value object

The value of the parameter.

type TDbType

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is blank.

AddParam(string, object?, ParameterDirection)

Adds a parameter to the params list.

public TThis AddParam(string name, object? value, ParameterDirection direction = ParameterDirection.Input)

Parameters

name string

The name of the parameter.

value object

The value of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is 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

name string

The name of the parameter.

value T?

The value of the parameter.

type TDbType?

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Type Parameters

T

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is 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

name string

The name of the parameter.

value int

The value of the parameter.

type TDbType?

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is 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

name string

The name of the parameter.

value long

The value of the parameter.

type TDbType?

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is 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

name string

The name of the parameter.

value string

The value of the parameter.

type TDbType?

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is blank.

AddParam(string, TDbType, ParameterDirection)

Adds a parameter to the params list.

public TThis AddParam(string name, TDbType type, ParameterDirection direction = ParameterDirection.Input)

Parameters

name string

The name of the parameter.

type TDbType

The database type of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is blank.

AddParam(string, ParameterDirection)

Adds a parameter to the params list.

public TThis AddParam(string name, ParameterDirection direction = ParameterDirection.Input)

Parameters

name string

The name of the parameter.

direction ParameterDirection

The direction of the parameter.

Returns

TThis

This instance for use in method chaining.

Exceptions

ArgumentNullException

name is null.

ArgumentException

name is blank.