Export (0) Print
Expand All

ColumnAttribute.DbType Property

Gets or sets the type of the database column.

Namespace:  System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public string DbType { get; set; }

Property Value

Type: System.String
See Remarks.

Use this property to specify the exact text that defines the column in a Transact-SQL table declaration. Specify the DbType property only if you plan to use CreateDatabase to create an instance of the database.

The default value of DbType is inferred from the member type. For more information, see SQL-CLR Type Mapping.

	[Column(Storage="_FirstName", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
	public string FirstName
			return this._FirstName;
			if ((this._FirstName != value))
				this._FirstName = value;

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft