Show / Hide Table of Contents

    Class SqlParameterCollectionExtensions

    This class adds extension methods which simplify setting SQL parameter values from .NET types.

    Inheritance
    System.Object
    SqlParameterCollectionExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ArgentSea.Sql
    Assembly: ArgentSea.Sql.dll
    Syntax
    public static class SqlParameterCollectionExtensions

    Methods

    | Improve this Doc View Source

    AddSqlBigIntInputParameter(DbParameterCollection, String, Int64)

    Creates a parameter for providing a 64-bit signed integer (long) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBigIntInputParameter(this DbParameterCollection prms, string parameterName, long value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int64 value

    A 64-bit signed integer value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBigIntInputParameter(DbParameterCollection, String, Nullable<Int64>)

    Creates a parameter for providing a 64-bit signed integer (long) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBigIntInputParameter(this DbParameterCollection prms, string parameterName, long? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Int64> value

    A 64-bit signed integer value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBigIntOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 64-bit signed integer (long) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBigIntOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBinaryInputParameter(DbParameterCollection, String, Byte[], Int32)

    Creates a parameter for providing a fixed-sized byte array to a stored procedure. A null reference will save DBNull.

    Declaration
    public static DbParameterCollection AddSqlBinaryInputParameter(this DbParameterCollection prms, string parameterName, byte[] value, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Byte[] value

    An array of bytes, or null.

    System.Int32 length

    The fixed number of bytes in the database column.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBinaryOutputParameter(DbParameterCollection, String, Int32)

    Creates a parameter for obtaining a fixed-sized byte array from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBinaryOutputParameter(this DbParameterCollection prms, string parameterName, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 length

    The fixed number of bytes in the database column.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBitInputParameter(DbParameterCollection, String, Boolean)

    Creates a parameter for providing a boolean value (bool) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBitInputParameter(this DbParameterCollection prms, string parameterName, bool value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Boolean value

    A boolean value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBitInputParameter(DbParameterCollection, String, Nullable<Boolean>)

    Creates a parameter for providing a boolean value (bool) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBitInputParameter(this DbParameterCollection prms, string parameterName, bool? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Boolean> value

    A boolean value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlBitOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a boolean value (bool) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlBitOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlCharInputParameter(DbParameterCollection, String, String, Int32, Int32)

    Creates parameter for providing a fixed-length string or a DBNull value to a stored procedure, which is converted to the target ANSI code page (if possible).

    Declaration
    public static DbParameterCollection AddSqlCharInputParameter(this DbParameterCollection prms, string parameterName, string value, int length, int localeId)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.String value

    An empty string will be saved as a zero-length string; a null string will be saved as a database null value.

    System.Int32 length

    Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces.

    System.Int32 localeId

    Specify the code page for ANSI conversions. For example, the value 1033 is U.S. English.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlCharOutputParameter(DbParameterCollection, String, Int32, Int32)

    Creates parameter for obtaining a fixed-length string from a stored procedure, which has been converted from the source ANSI code page.

    Declaration
    public static DbParameterCollection AddSqlCharOutputParameter(this DbParameterCollection prms, string parameterName, int length, int localeId)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 length

    Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces.

    System.Int32 localeId

    Specify the code page for ANSI conversions. For example, the value 1033 is U.S. English.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateInputParameter(DbParameterCollection, String, DateTime)

    Creates a parameter for providing a date (sans time) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateInputParameter(this DbParameterCollection prms, string parameterName, DateTime value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.DateTime value

    A DateTime value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateInputParameter(DbParameterCollection, String, Nullable<DateTime>)

    Creates a parameter for providing a date (sans time) or DbNull to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateInputParameter(this DbParameterCollection prms, string parameterName, DateTime? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.DateTime> value

    A DateTime value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a date (sans time) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTime2InputParameter(DbParameterCollection, String, DateTime)

    Creates a parameter for providing a date and time value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTime2InputParameter(this DbParameterCollection prms, string parameterName, DateTime value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.DateTime value

    A date and time value .

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTime2InputParameter(DbParameterCollection, String, Nullable<DateTime>)

    Creates a parameter for providing a date and time value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTime2InputParameter(this DbParameterCollection prms, string parameterName, DateTime? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.DateTime> value

    A date and time value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTime2OutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving date and time value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTime2OutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeInputParameter(DbParameterCollection, String, DateTime)

    Creates a parameter for providing a date and time value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeInputParameter(this DbParameterCollection prms, string parameterName, DateTime value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.DateTime value

    A date and time value .

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeInputParameter(DbParameterCollection, String, Nullable<DateTime>)

    Creates a parameter for providing a date and time value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeInputParameter(this DbParameterCollection prms, string parameterName, DateTime? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.DateTime> value

    A date and time value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeOffsetInputParameter(DbParameterCollection, String, DateTimeOffset)

    Creates a parameter for providing a DateTimeOffset value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeOffsetInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.DateTimeOffset value

    A DateTimeOffset value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeOffsetInputParameter(DbParameterCollection, String, Nullable<DateTimeOffset>)

    Creates a parameter for providing a DateTimeOffset or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeOffsetInputParameter(this DbParameterCollection prms, string parameterName, DateTimeOffset? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.DateTimeOffset> value

    A DateTimeOffset value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeOffsetOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a DateTimeOffset from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeOffsetOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDateTimeOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a date and time value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDateTimeOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDecimalInputParameter(DbParameterCollection, String, Decimal, Byte, Byte)

    Creates a parameter for providing a decmial value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDecimalInputParameter(this DbParameterCollection prms, string parameterName, decimal value, byte precision, byte scale)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Decimal value

    A decmial value .

    System.Byte precision
    System.Byte scale
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDecimalInputParameter(DbParameterCollection, String, Nullable<Decimal>, Byte, Byte)

    Creates a parameter for providing a decmial value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDecimalInputParameter(this DbParameterCollection prms, string parameterName, decimal? value, byte precision, byte scale)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Decimal> value

    A decmial value or null.

    System.Byte precision
    System.Byte scale
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlDecimalOutputParameter(DbParameterCollection, String, Byte, Byte)

    Creates an output parameter for retrieving a decmial value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlDecimalOutputParameter(this DbParameterCollection prms, string parameterName, byte precision, byte scale)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Byte precision

    Specifies the maximum number of digits used to store the number (inclusive of both sides of the decimal point).

    System.Byte scale

    Specifies the number of digits used in the fractional portion of the number (i.e. digits to the right of the decimal point).

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlFloatInputParameter(DbParameterCollection, String, Double)

    Creates a parameter for providing a 64-bit floating-point value (double) to a stored procedure. NaN will be converted to DbNull.

    Declaration
    public static DbParameterCollection AddSqlFloatInputParameter(this DbParameterCollection prms, string parameterName, double value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Double value

    A 64-bit floating-point value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlFloatInputParameter(DbParameterCollection, String, Nullable<Double>)

    Creates a parameter for providing a 64-bit floating-point value (double) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlFloatInputParameter(this DbParameterCollection prms, string parameterName, double? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Double> value

    A 64-bit floating-point value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlFloatOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 64-bit floating-point value (double) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlFloatOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlIntInputParameter(DbParameterCollection, String, Int32)

    Creates a parameter for providing a 32-bit signed integer (int) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlIntInputParameter(this DbParameterCollection prms, string parameterName, int value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 value

    A 32-bit signed integer value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlIntInputParameter(DbParameterCollection, String, Nullable<Int32>)

    Creates a parameter for providing a 32-bit signed integer (int) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlIntInputParameter(this DbParameterCollection prms, string parameterName, int? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Int32> value

    A 32-bit signed integer value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlIntOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 32-bit signed integer (int) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlIntOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlMoneyInputParameter(DbParameterCollection, String, Decimal)

    Creates a parameter for providing a decmial value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Decimal value

    A decmial value .

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlMoneyInputParameter(DbParameterCollection, String, Nullable<Decimal>)

    Creates a parameter for providing a decmial value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Decimal> value

    A decmial value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlMoneyOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a decmial value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlMoneyOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlNCharInputParameter(DbParameterCollection, String, String, Int32)

    Creates parameter for providing a fixed-length string or a DBNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlNCharInputParameter(this DbParameterCollection prms, string parameterName, string value, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.String value

    An empty string will be saved as a zero-length string; a null string will be saved as a database null value.

    System.Int32 length

    Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlNCharOutputParameter(DbParameterCollection, String, Int32)

    Creates parameter for obtaining a fixed-length string from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlNCharOutputParameter(this DbParameterCollection prms, string parameterName, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 length

    Specifies the number of characters in the string. If the original string value is smaller than this length, the returned value will be padded with spaces.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlNVarCharInputParameter(DbParameterCollection, String, String, Int32)

    Creates parameter for providing a string or a DBNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlNVarCharInputParameter(this DbParameterCollection prms, string parameterName, string value, int maxLength)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.String value

    An empty string will be saved as a zero-length string; a null string will be saved as a database null value.

    System.Int32 maxLength

    This should match the size of the parameter, not the size of the input string (and certainly not the number of bytes). For nvarchar(max) parameters, specify -1. Setting the value correctly will help avoid plan cache pollution (when not using stored procedures) and minimize memory buffer allocations.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlNVarCharOutputParameter(DbParameterCollection, String, Int32)

    Creates parameter for obtaining a string from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlNVarCharOutputParameter(this DbParameterCollection prms, string parameterName, int maxLength)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 maxLength
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlRealInputParameter(DbParameterCollection, String, Nullable<Single>)

    Creates a parameter for providing a 32-bit floating-point value (float) or DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlRealInputParameter(this DbParameterCollection prms, string parameterName, float? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Single> value

    A 32-bit floating point value (float) or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlRealInputParameter(DbParameterCollection, String, Single)

    Creates a parameter for providing a 32-bit floating-point value (float) to a stored procedure. NaN will be converted to DbNull.

    Declaration
    public static DbParameterCollection AddSqlRealInputParameter(this DbParameterCollection prms, string parameterName, float value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Single value

    A 32-bit floating point value (float).

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlRealOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 32-bit floating-point value (float) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlRealOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallIntInputParameter(DbParameterCollection, String, Int16)

    Creates a parameter for providing a 16-bit signed integer (short) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallIntInputParameter(this DbParameterCollection prms, string parameterName, short value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int16 value

    A 16-bit signed integer value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallIntInputParameter(DbParameterCollection, String, Nullable<Int16>)

    Creates a parameter for providing a 16-bit signed integer (short) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallIntInputParameter(this DbParameterCollection prms, string parameterName, short? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Int16> value

    A 16-bit signed integer value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallIntOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 32-bit signed integer (short) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallIntOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallMoneyInputParameter(DbParameterCollection, String, Decimal)

    Creates a parameter for providing a decmial value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Decimal value

    A decmial value .

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallMoneyInputParameter(DbParameterCollection, String, Nullable<Decimal>)

    Creates a parameter for providing a decmial value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallMoneyInputParameter(this DbParameterCollection prms, string parameterName, decimal? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Decimal> value

    A decmial value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlSmallMoneyOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a decmial value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlSmallMoneyOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTableValuedParameter(DbParameterCollection, String, IEnumerable<SqlDataRecord>)

    Creates a parameter for providing a user-defined table to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter(this DbParameterCollection prms, string parameterName, IEnumerable<SqlDataRecord> value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Collections.Generic.IEnumerable<Microsoft.SqlServer.Server.SqlDataRecord> value

    A list of SqlDataRecord objects containing the table contents.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTableValuedParameter<TModel>(DbParameterCollection, String, IEnumerable<TModel>, ILogger)

    Creates a parameter for providing a user-defined table to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TModel>(this DbParameterCollection prms, string parameterName, IEnumerable<TModel> values, ILogger logger)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Collections.Generic.IEnumerable<TModel> values
    Microsoft.Extensions.Logging.ILogger logger
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    Type Parameters
    Name Description
    TModel
    | Improve this Doc View Source

    AddSqlTableValuedParameter<TModel>(DbParameterCollection, String, IEnumerable<TModel>, IList<String>, ILogger)

    Creates a parameter for providing a user-defined table to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TModel>(this DbParameterCollection prms, string parameterName, IEnumerable<TModel> values, IList<string> columnList, ILogger logger)
        where TModel : class, new()
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Collections.Generic.IEnumerable<TModel> values
    System.Collections.Generic.IList<System.String> columnList
    Microsoft.Extensions.Logging.ILogger logger
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    Type Parameters
    Name Description
    TModel
    | Improve this Doc View Source

    AddSqlTableValuedParameter<TShard, TRecord>(DbParameterCollection, String, IEnumerable<ShardKey<TShard, TRecord>>, String, SqlDbType, String, SqlDbType)

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TShard, TRecord>(this DbParameterCollection prms, string parameterName, IEnumerable<ShardKey<TShard, TRecord>> values, string shardIdName, SqlDbType shardIdType, string recordIdName, SqlDbType recordIdType)
        where TShard : IComparable where TRecord : IComparable
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms
    System.String parameterName
    System.Collections.Generic.IEnumerable<ShardKey<TShard, TRecord>> values
    System.String shardIdName
    System.Data.SqlDbType shardIdType
    System.String recordIdName
    System.Data.SqlDbType recordIdType
    Returns
    Type Description
    System.Data.Common.DbParameterCollection
    Type Parameters
    Name Description
    TShard
    TRecord
    | Improve this Doc View Source

    AddSqlTableValuedParameter<TModel, TShard, TRecord>(DbParameterCollection, String, IEnumerable<TModel>, String, SqlDbType, String, SqlDbType)

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TModel, TShard, TRecord>(this DbParameterCollection prms, string parameterName, IEnumerable<TModel> values, string shardIdName, SqlDbType shardIdType, string recordIdName, SqlDbType recordIdType)
        where TModel : IKeyedModel<TShard, TRecord> where TShard : IComparable where TRecord : IComparable
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms
    System.String parameterName
    System.Collections.Generic.IEnumerable<TModel> values
    System.String shardIdName
    System.Data.SqlDbType shardIdType
    System.String recordIdName
    System.Data.SqlDbType recordIdType
    Returns
    Type Description
    System.Data.Common.DbParameterCollection
    Type Parameters
    Name Description
    TModel
    TShard
    TRecord
    | Improve this Doc View Source

    AddSqlTableValuedParameter<TShard, TRecord, TChild>(DbParameterCollection, String, IEnumerable<ShardChild<TShard, TRecord, TChild>>, String, SqlDbType, String, SqlDbType, String, SqlDbType)

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TShard, TRecord, TChild>(this DbParameterCollection prms, string parameterName, IEnumerable<ShardChild<TShard, TRecord, TChild>> values, string shardIdName, SqlDbType shardIdType, string recordIdName, SqlDbType recordIdType, string childIdName, SqlDbType childIdType)
        where TShard : IComparable where TRecord : IComparable where TChild : IComparable
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms
    System.String parameterName
    System.Collections.Generic.IEnumerable<ShardChild<TShard, TRecord, TChild>> values
    System.String shardIdName
    System.Data.SqlDbType shardIdType
    System.String recordIdName
    System.Data.SqlDbType recordIdType
    System.String childIdName
    System.Data.SqlDbType childIdType
    Returns
    Type Description
    System.Data.Common.DbParameterCollection
    Type Parameters
    Name Description
    TShard
    TRecord
    TChild
    | Improve this Doc View Source

    AddSqlTableValuedParameter<TModel, TShard, TRecord, TChild>(DbParameterCollection, String, IEnumerable<TModel>, String, SqlDbType, String, SqlDbType, String, SqlDbType)

    Declaration
    public static DbParameterCollection AddSqlTableValuedParameter<TModel, TShard, TRecord, TChild>(this DbParameterCollection prms, string parameterName, IEnumerable<TModel> values, string shardIdName, SqlDbType shardIdType, string recordIdName, SqlDbType recordIdType, string childIdName, SqlDbType childIdType)
        where TModel : IKeyedChildModel<TShard, TRecord, TChild> where TShard : IComparable where TRecord : IComparable where TChild : IComparable
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms
    System.String parameterName
    System.Collections.Generic.IEnumerable<TModel> values
    System.String shardIdName
    System.Data.SqlDbType shardIdType
    System.String recordIdName
    System.Data.SqlDbType recordIdType
    System.String childIdName
    System.Data.SqlDbType childIdType
    Returns
    Type Description
    System.Data.Common.DbParameterCollection
    Type Parameters
    Name Description
    TModel
    TShard
    TRecord
    TChild
    | Improve this Doc View Source

    AddSqlTimeInputParameter(DbParameterCollection, String, Nullable<TimeSpan>)

    Creates a parameter for providing a time value or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTimeInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.TimeSpan> value

    A time value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTimeInputParameter(DbParameterCollection, String, TimeSpan)

    Creates a parameter for providing a time value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTimeInputParameter(this DbParameterCollection prms, string parameterName, TimeSpan value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.TimeSpan value

    A time value .

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTimeOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a time value from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTimeOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTinyIntInputParameter(DbParameterCollection, String, Byte)

    Creates a parameter for providing a 8-bit unsigned integer (byte) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTinyIntInputParameter(this DbParameterCollection prms, string parameterName, byte value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Byte value

    An unsigned 8-bit integer value.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTinyIntInputParameter(DbParameterCollection, String, Nullable<Byte>)

    Creates a parameter for providing a 8-bit unsigned integer (byte) or a DbNull value to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTinyIntInputParameter(this DbParameterCollection prms, string parameterName, byte? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Byte> value

    An unsigned 8-bit integer value or null.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlTinyIntOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a 32-bit signed integer (byte) from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlTinyIntOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlUniqueIdentifierInputParameter(DbParameterCollection, String, Guid)

    Creates a parameter for providing a Guid or DBNull (via Guid.Empty) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlUniqueIdentifierInputParameter(this DbParameterCollection prms, string parameterName, Guid value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Guid value

    A Guid value. Will convert Guild.Empty to DBNull.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlUniqueIdentifierInputParameter(DbParameterCollection, String, Nullable<Guid>)

    Creates a parameter for providing a Guid or DBNull (via null value) to a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlUniqueIdentifierInputParameter(this DbParameterCollection prms, string parameterName, Guid? value)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Nullable<System.Guid> value
    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlUniqueIdentifierOutputParameter(DbParameterCollection, String)

    Creates an output parameter for retrieving a Guid from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlUniqueIdentifierOutputParameter(this DbParameterCollection prms, string parameterName)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlVarBinaryInputParameter(DbParameterCollection, String, Byte[], Int32)

    Creates a parameter for providing a variable-sized byte array to a stored procedure. A null reference will save DBNull.

    Declaration
    public static DbParameterCollection AddSqlVarBinaryInputParameter(this DbParameterCollection prms, string parameterName, byte[] value, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Byte[] value

    An array of bytes, or null.

    System.Int32 length

    The maximum allowable number of bytes in the database column. Use -1 for varbinary(max).

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlVarBinaryOutputParameter(DbParameterCollection, String, Int32)

    Creates a parameter for obtaining a variable-sized byte array from a stored procedure.

    Declaration
    public static DbParameterCollection AddSqlVarBinaryOutputParameter(this DbParameterCollection prms, string parameterName, int length)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 length

    The maximum allowable number of bytes in the database column. Use -1 for varbinary(max).

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlVarCharInputParameter(DbParameterCollection, String, String, Int32, Int32)

    Creates parameter for providing a string or a DBNull value to a stored procedure, which is converted to the target ANSI code page (if possible).

    Declaration
    public static DbParameterCollection AddSqlVarCharInputParameter(this DbParameterCollection prms, string parameterName, string value, int maxLength, int localeId)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.String value

    An empty string will be saved as a zero-length string; a null string will be saved as a database null value.

    System.Int32 maxLength

    This should match the size of the parameter, not the size of the input string (and certainly not the number of bytes). For nvarchar(max) parameters, specify -1. Setting the value correctly will help avoid plan cache pollution (when not using stored procedures) and minimize memory buffer allocations.

    System.Int32 localeId

    Specify the code page for ANSI conversions. For example, the value 1033 is U.S. English.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    | Improve this Doc View Source

    AddSqlVarCharOutputParameter(DbParameterCollection, String, Int32, Int32)

    Creates parameter for obtaining a string from a stored procedure, which has been converted from the source ANSI code page.

    Declaration
    public static DbParameterCollection AddSqlVarCharOutputParameter(this DbParameterCollection prms, string parameterName, int maxLength, int localeId)
    Parameters
    Type Name Description
    System.Data.Common.DbParameterCollection prms

    The existing parameter collection to which this output parameter should be added.

    System.String parameterName

    The name of the parameter. If the name doesn’t start with “@”, it will be automatically pre-pended.

    System.Int32 maxLength

    This should match the size of the parameter, not the size of the input string (and certainly not the number of bytes). For nvarchar(max) parameters, specify -1. Setting the value correctly will help avoid plan cache pollution (when not using stored procedures) and minimize memory buffer allocations.

    System.Int32 localeId

    Specify the code page for ANSI conversions. For example, the value 1033 is U.S. English.

    Returns
    Type Description
    System.Data.Common.DbParameterCollection

    The DbParameterCollection to which the parameter was appended.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX