Search Results for

    Show / Hide Table of Contents

    Class NpgsqlParameter<T>

    A generic version of NpgsqlParameter which provides more type safety and avoids boxing of value types. Use TypedValue instead of Value.

    Inheritance
    object
    NpgsqlParameter
    NpgsqlParameter<T>
    Implements
    IDbDataParameter
    ICloneable
    Inherited Members
    NpgsqlParameter.ParameterName
    NpgsqlParameter.NpgsqlValue
    NpgsqlParameter.DbType
    NpgsqlParameter.NpgsqlDbType
    NpgsqlParameter.DataTypeName
    NpgsqlParameter.IsNullable
    NpgsqlParameter.Direction
    NpgsqlParameter.Precision
    NpgsqlParameter.Scale
    NpgsqlParameter.Size
    NpgsqlParameter.SourceColumn
    NpgsqlParameter.SourceVersion
    NpgsqlParameter.SourceColumnNullMapping
    NpgsqlParameter.Collection
    NpgsqlParameter.PostgresType
    NpgsqlParameter.ResetDbType()
    NpgsqlParameter.Clone()
    Namespace: Npgsql
    Assembly: Npgsql.dll
    Syntax
    public sealed class NpgsqlParameter<T> : NpgsqlParameter, IDbDataParameter, ICloneable
    Type Parameters
    Name Description
    T

    The type of the value that will be stored in the parameter.

    Constructors

    | Improve this Doc View Source

    NpgsqlParameter()

    Initializes a new instance of NpgsqlParameter<T>.

    Declaration
    public NpgsqlParameter()
    | Improve this Doc View Source

    NpgsqlParameter(string, T)

    Initializes a new instance of NpgsqlParameter<T> with a parameter name and value.

    Declaration
    public NpgsqlParameter(string parameterName, T value)
    Parameters
    Type Name Description
    string parameterName
    T value
    | Improve this Doc View Source

    NpgsqlParameter(string, DbType)

    Initializes a new instance of NpgsqlParameter<T> with a parameter name and type.

    Declaration
    public NpgsqlParameter(string parameterName, DbType dbType)
    Parameters
    Type Name Description
    string parameterName
    DbType dbType
    | Improve this Doc View Source

    NpgsqlParameter(string, NpgsqlDbType)

    Initializes a new instance of NpgsqlParameter<T> with a parameter name and type.

    Declaration
    public NpgsqlParameter(string parameterName, NpgsqlDbType npgsqlDbType)
    Parameters
    Type Name Description
    string parameterName
    NpgsqlDbType npgsqlDbType

    Properties

    | Improve this Doc View Source

    TypedValue

    Gets or sets the strongly-typed value of the parameter.

    Declaration
    public T? TypedValue { get; set; }
    Property Value
    Type Description
    T
    | Improve this Doc View Source

    Value

    Gets or sets the value of the parameter. This delegates to TypedValue.

    Declaration
    public override object? Value { get; set; }
    Property Value
    Type Description
    object?
    Overrides
    NpgsqlParameter.Value

    Implements

    IDbDataParameter
    ICloneable
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team