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
System.Object
System.MarshalByRefObject
System.Data.Common.DbParameter
NpgsqlParameter
NpgsqlParameter<T>
Implements
System.Data.IDbDataParameter
System.Data.IDataParameter
System.ICloneable
Inherited Members
NpgsqlParameter.ConvertedValue
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()
NpgsqlParameter.ICloneable.Clone()
System.Data.Common.DbParameter.System.Data.IDbDataParameter.Precision
System.Data.Common.DbParameter.System.Data.IDbDataParameter.Scale
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.CreateObjRef(System.Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Npgsql
Assembly: Npgsql.dll
Syntax
public sealed class NpgsqlParameter<T> : NpgsqlParameter, IDbDataParameter, IDataParameter, ICloneable
Type Parameters
Name Description
T

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

Constructors

NpgsqlParameter()

Initializes a new instance of NpgsqlParameter<T>.

Declaration
public NpgsqlParameter()

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
System.String parameterName
T value

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
System.String parameterName
NpgsqlDbType npgsqlDbType

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
System.String parameterName
System.Data.DbType dbType

Properties

TypedValue

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

Declaration
public T TypedValue { get; set; }
Property Value
Type Description
T

Value

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

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

Implements

System.Data.IDbDataParameter
System.Data.IDataParameter
System.ICloneable
In This Article
Back to top Generated by DocFX