Table of Contents

Class DataParameter

Namespace
LinqToDB.Data
Assembly
linq2db.dll
[ScalarType]
public class DataParameter
Inheritance
DataParameter
Extension Methods

Constructors

DataParameter()

public DataParameter()

DataParameter(string?, object?)

public DataParameter(string? name, object? value)

Parameters

name string
value object

DataParameter(string?, object?, DataType)

public DataParameter(string? name, object? value, DataType dataType)

Parameters

name string
value object
dataType DataType

DataParameter(string?, object?, DataType, string?)

public DataParameter(string? name, object? value, DataType dataType, string? dbType)

Parameters

name string
value object
dataType DataType
dbType string

DataParameter(string?, object?, string)

public DataParameter(string? name, object? value, string dbType)

Parameters

name string
value object
dbType string

Properties

DataType

Gets or sets the DataType of the parameter.

public DataType DataType { get; set; }

Property Value

DataType

One of the DataType values. The default is Undefined.

DbType

Gets or sets Database Type name of the parameter.

public string? DbType { get; set; }

Property Value

string

Name of Database Type or empty string.

Direction

Gets or sets a value indicating whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.

public ParameterDirection? Direction { get; set; }

Property Value

ParameterDirection?

One of the ParameterDirection values. The default is Input.

IsArray

public bool IsArray { get; set; }

Property Value

bool

Name

Gets or sets the name of the DataParameter.

public string? Name { get; set; }

Property Value

string

The name of the DataParameter. The default is an empty string.

Output

Provider's parameter instance for out, in-out, return parameters. Could be used to read parameter value for complex types like Oracle's BFile.

public DbParameter? Output { get; }

Property Value

DbParameter

Precision

Gets or sets precision for parameter type.

public int? Precision { get; set; }

Property Value

int?

Scale

Gets or sets scale for parameter type.

public int? Scale { get; set; }

Property Value

int?

Size

Gets or sets the maximum size, in bytes, of the data within the column.

public int? Size { get; set; }

Property Value

int?

The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.

Value

Gets or sets the value of the parameter.

public object? Value { get; set; }

Property Value

object

An object that is the value of the parameter. The default value is null.

Methods

Binary(string?, byte[]?)

public static DataParameter Binary(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

Binary(string?, Binary?)

public static DataParameter Binary(string? name, Binary? value)

Parameters

name string
value Binary

Returns

DataParameter

BinaryJson(string?, string?)

public static DataParameter BinaryJson(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

BitArray(string?, BitArray?)

public static DataParameter BitArray(string? name, BitArray? value)

Parameters

name string
value BitArray

Returns

DataParameter

Blob(string?, byte[]?)

public static DataParameter Blob(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

Boolean(string?, bool)

public static DataParameter Boolean(string? name, bool value)

Parameters

name string
value bool

Returns

DataParameter

Byte(string?, byte)

public static DataParameter Byte(string? name, byte value)

Parameters

name string
value byte

Returns

DataParameter

Char(string?, char)

public static DataParameter Char(string? name, char value)

Parameters

name string
value char

Returns

DataParameter

Char(string?, string?)

public static DataParameter Char(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

Create(string?, bool)

public static DataParameter Create(string? name, bool value)

Parameters

name string
value bool

Returns

DataParameter

Create(string?, byte)

public static DataParameter Create(string? name, byte value)

Parameters

name string
value byte

Returns

DataParameter

Create(string?, byte[]?)

public static DataParameter Create(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

Create(string?, char)

public static DataParameter Create(string? name, char value)

Parameters

name string
value char

Returns

DataParameter

Create(string?, BitArray?)

public static DataParameter Create(string? name, BitArray? value)

Parameters

name string
value BitArray

Returns

DataParameter

Create(string?, Dictionary<string, string>?)

public static DataParameter Create(string? name, Dictionary<string, string>? value)

Parameters

name string
value Dictionary<string, string>

Returns

DataParameter

Create(string?, Binary?)

public static DataParameter Create(string? name, Binary? value)

Parameters

name string
value Binary

Returns

DataParameter

Create(string?, DateTime)

public static DataParameter Create(string? name, DateTime value)

Parameters

name string
value DateTime

Returns

DataParameter

Create(string?, DateTimeOffset)

public static DataParameter Create(string? name, DateTimeOffset value)

Parameters

name string
value DateTimeOffset

Returns

DataParameter

Create(string?, decimal)

public static DataParameter Create(string? name, decimal value)

Parameters

name string
value decimal

Returns

DataParameter

Create(string?, double)

public static DataParameter Create(string? name, double value)

Parameters

name string
value double

Returns

DataParameter

Create(string?, Guid)

public static DataParameter Create(string? name, Guid value)

Parameters

name string
value Guid

Returns

DataParameter

Create(string?, short)

public static DataParameter Create(string? name, short value)

Parameters

name string
value short

Returns

DataParameter

Create(string?, int)

public static DataParameter Create(string? name, int value)

Parameters

name string
value int

Returns

DataParameter

Create(string?, long)

public static DataParameter Create(string? name, long value)

Parameters

name string
value long

Returns

DataParameter

Create(string?, sbyte)

[CLSCompliant(false)]
public static DataParameter Create(string? name, sbyte value)

Parameters

name string
value sbyte

Returns

DataParameter

Create(string?, float)

public static DataParameter Create(string? name, float value)

Parameters

name string
value float

Returns

DataParameter

Create(string?, string?)

public static DataParameter Create(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

Create(string?, TimeSpan)

public static DataParameter Create(string? name, TimeSpan value)

Parameters

name string
value TimeSpan

Returns

DataParameter

Create(string?, ushort)

[CLSCompliant(false)]
public static DataParameter Create(string? name, ushort value)

Parameters

name string
value ushort

Returns

DataParameter

Create(string?, uint)

[CLSCompliant(false)]
public static DataParameter Create(string? name, uint value)

Parameters

name string
value uint

Returns

DataParameter

Create(string?, ulong)

[CLSCompliant(false)]
public static DataParameter Create(string? name, ulong value)

Parameters

name string
value ulong

Returns

DataParameter

Create(string?, XDocument?)

public static DataParameter Create(string? name, XDocument? value)

Parameters

name string
value XDocument

Returns

DataParameter

Create(string?, XmlDocument?)

public static DataParameter Create(string? name, XmlDocument? value)

Parameters

name string
value XmlDocument

Returns

DataParameter

Date(string?, DateTime)

public static DataParameter Date(string? name, DateTime value)

Parameters

name string
value DateTime

Returns

DataParameter

DateTime(string?, DateTime)

public static DataParameter DateTime(string? name, DateTime value)

Parameters

name string
value DateTime

Returns

DataParameter

DateTime2(string?, DateTime)

public static DataParameter DateTime2(string? name, DateTime value)

Parameters

name string
value DateTime

Returns

DataParameter

DateTimeOffset(string?, DateTimeOffset)

public static DataParameter DateTimeOffset(string? name, DateTimeOffset value)

Parameters

name string
value DateTimeOffset

Returns

DataParameter

Decimal(string?, decimal)

public static DataParameter Decimal(string? name, decimal value)

Parameters

name string
value decimal

Returns

DataParameter

Dictionary(string?, IDictionary?)

public static DataParameter Dictionary(string? name, IDictionary? value)

Parameters

name string
value IDictionary

Returns

DataParameter

Double(string?, double)

public static DataParameter Double(string? name, double value)

Parameters

name string
value double

Returns

DataParameter

Guid(string?, Guid)

public static DataParameter Guid(string? name, Guid value)

Parameters

name string
value Guid

Returns

DataParameter

Image(string?, byte[]?)

public static DataParameter Image(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

Int16(string?, short)

public static DataParameter Int16(string? name, short value)

Parameters

name string
value short

Returns

DataParameter

Int32(string?, int)

public static DataParameter Int32(string? name, int value)

Parameters

name string
value int

Returns

DataParameter

Int64(string?, long)

public static DataParameter Int64(string? name, long value)

Parameters

name string
value long

Returns

DataParameter

Json(string?, string?)

public static DataParameter Json(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

Money(string?, decimal)

public static DataParameter Money(string? name, decimal value)

Parameters

name string
value decimal

Returns

DataParameter

NChar(string?, char)

public static DataParameter NChar(string? name, char value)

Parameters

name string
value char

Returns

DataParameter

NChar(string?, string?)

public static DataParameter NChar(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

NText(string?, string?)

public static DataParameter NText(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

NVarChar(string?, char)

public static DataParameter NVarChar(string? name, char value)

Parameters

name string
value char

Returns

DataParameter

NVarChar(string?, string?)

public static DataParameter NVarChar(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

SByte(string?, sbyte)

[CLSCompliant(false)]
public static DataParameter SByte(string? name, sbyte value)

Parameters

name string
value sbyte

Returns

DataParameter

Single(string?, float)

public static DataParameter Single(string? name, float value)

Parameters

name string
value float

Returns

DataParameter

SmallDateTime(string?, DateTime)

public static DataParameter SmallDateTime(string? name, DateTime value)

Parameters

name string
value DateTime

Returns

DataParameter

SmallMoney(string?, decimal)

public static DataParameter SmallMoney(string? name, decimal value)

Parameters

name string
value decimal

Returns

DataParameter

Text(string?, string?)

public static DataParameter Text(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

Time(string?, TimeSpan)

public static DataParameter Time(string? name, TimeSpan value)

Parameters

name string
value TimeSpan

Returns

DataParameter

Timestamp(string?, byte[]?)

public static DataParameter Timestamp(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

UInt16(string?, ushort)

[CLSCompliant(false)]
public static DataParameter UInt16(string? name, ushort value)

Parameters

name string
value ushort

Returns

DataParameter

UInt32(string?, uint)

[CLSCompliant(false)]
public static DataParameter UInt32(string? name, uint value)

Parameters

name string
value uint

Returns

DataParameter

UInt64(string?, ulong)

[CLSCompliant(false)]
public static DataParameter UInt64(string? name, ulong value)

Parameters

name string
value ulong

Returns

DataParameter

Udt(string?, object?)

public static DataParameter Udt(string? name, object? value)

Parameters

name string
value object

Returns

DataParameter

VarBinary(string?, byte[]?)

public static DataParameter VarBinary(string? name, byte[]? value)

Parameters

name string
value byte[]

Returns

DataParameter

VarBinary(string?, Binary?)

public static DataParameter VarBinary(string? name, Binary? value)

Parameters

name string
value Binary

Returns

DataParameter

VarChar(string?, char)

public static DataParameter VarChar(string? name, char value)

Parameters

name string
value char

Returns

DataParameter

VarChar(string?, string?)

public static DataParameter VarChar(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

VarNumeric(string?, decimal)

public static DataParameter VarNumeric(string? name, decimal value)

Parameters

name string
value decimal

Returns

DataParameter

Variant(string?, object?)

public static DataParameter Variant(string? name, object? value)

Parameters

name string
value object

Returns

DataParameter

Xml(string?, string?)

public static DataParameter Xml(string? name, string? value)

Parameters

name string
value string

Returns

DataParameter

Xml(string?, XDocument?)

public static DataParameter Xml(string? name, XDocument? value)

Parameters

name string
value XDocument

Returns

DataParameter

Xml(string?, XmlDocument?)

public static DataParameter Xml(string? name, XmlDocument? value)

Parameters

name string
value XmlDocument

Returns

DataParameter