Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

EntityParameter Class

Represents a parameter to an EntityCommand. This class cannot be inherited.

System.Object
  System.MarshalByRefObject
    System.Data.Common.DbParameter
      System.Data.EntityClient.EntityParameter

Namespace:  System.Data.EntityClient
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public sealed class EntityParameter : DbParameter, 
	IDbDataParameter, IDataParameter

The EntityParameter type exposes the following members.

  NameDescription
Public methodEntityParameter()Initializes a new instance of the EntityParameter class.
Public methodEntityParameter(String, DbType)Initializes a new instance of the EntityParameter class that uses the parameter name and the data type.
Public methodEntityParameter(String, DbType, Int32)Initializes a new instance of the EntityParameter class that uses the parameter name, the data type, and the size.
Public methodEntityParameter(String, DbType, Int32, String)Initializes a new instance of the EntityParameter class that uses the parameter name, the data type, the size, and the source column name.
Public methodEntityParameter(String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)Initializes a new instance of the EntityParameter class that uses the parameter name, the type, the size, the direction, the precision, the scale, the source column, a DataRowVersion to use, and the value of the parameter.
Top

  NameDescription
Public propertyDbTypeGets or sets the DbType of the parameter. (Overrides DbParameter.DbType.)
Public propertyDirectionGets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter. (Overrides DbParameter.Direction.)
Public propertyIsNullableGets or sets a value that indicates whether the parameter accepts null values. (Overrides DbParameter.IsNullable.)
Public propertyParameterNameGets or sets the name of the EntityParameter. (Overrides DbParameter.ParameterName.)
Public propertyPrecisionGets or sets the maximum number of digits used to represent the Value property.
Public propertyScaleGets or sets the number of decimal places to which Value is resolved.
Public propertySizeGets or sets the maximum size, in bytes, of the data in the column. (Overrides DbParameter.Size.)
Public propertySourceColumnGets or sets the name of the source column in a cached row that the EntityParameter is mapped to. (Overrides DbParameter.SourceColumn.)
Public propertySourceColumnNullMappingGets or sets a value which indicates whether the source column is nullable. (Overrides DbParameter.SourceColumnNullMapping.)
Public propertySourceVersionGets or sets the DataRowVersion to use when you load Value (Overrides DbParameter.SourceVersion.)
Public propertyValueGets or sets the value of the parameter. (Overrides DbParameter.Value.)
Top

  NameDescription
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public methodResetDbTypeResets the type associated with this EntityParameter. (Overrides DbParameter.ResetDbType().)
Public methodToStringGets a string that contains the ParameterName. (Overrides Object.ToString().)
Top

  NameDescription
Explicit interface implemetationPrivate propertyIDbDataParameter.PrecisionIndicates the precision of numeric parameters. (Inherited from DbParameter.)
Explicit interface implemetationPrivate propertyIDbDataParameter.ScaleFor a description of this member, see IDbDataParameter.Scale. (Inherited from DbParameter.)
Top

Parameter names are not case sensitive.

For conceptual information about using EntityParameter, see ADO.NET Entity Framework.

For code examples, see Working with EntityClient.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2015 Microsoft