This documentation is archived and is not being maintained.

EntityParameter Constructor (String, DbType)

Initializes a new instance of the EntityParameter class that uses the parameter name and the data type.

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

public EntityParameter(
	string parameterName,
	DbType dbType


Type: System.String

The name of the parameter to map.

Type: System.Data.DbType

One of the DbType values.


The value supplied in the dbType parameter is an invalid back-end data type.

The data type and, if appropriate, size and precision are inferred from the value of the dbType parameter.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5 SP1