SqlClient for Entity FrameworkTypes

The .NET Framework Data Provider for SQL Server (SqlClient) provider manifest file includes the list of the provider primitive types, facets for each type, the mappings between the conceptual and storage model primitive types, and the promotion and conversion rules between the conceptual and storage model primitive types.

The following table describes types for SQL Server 2008, SQL Server 2005, and SQL Server 2000 databases and how these types map to conceptual model types. Some new types were introduced in later versions of SQL Server are not supported in the older versions of SQL Server. These types are noted in the table below.

Provider type name Provider type attributes EDMSimpleType name Facets

bit

n/a

Edm.Boolean

n/a

tinyint

n/a

Edm.Byte

n/a

smallint

n/a

Edm.Int16

n/a

int

n/a

Edm.Int32

n/a

bigint

n/a

Edm.Int64

n/a

float

n/a

Edm.Double

n/a

real

n/a

Edm.Double

n/a

decimal

n/a

Edm.Decimal

Facet name Attribute name Value
Precision Minimum Maximum Default Constant 1 38 18 False
Scale Minimum Maximum Default Constant 0 38 0 False

numeric

n/a

Edm.Decimal

Facet name Attribute name Value
Precision Minimum Maximum Default Constant 1 38 18 False
Scale Minimum Maximum Default Constant 0 38 0 False

smallmoney

n/a

Edm.Decimal

Facet name Attribute name Value
Precision Default Constant 10 True
Scale Default Constant 4 True

money

n/a

Edm.Decimal

Facet name Attribute name Value
Precision Default Constant 19 True
Scale Default Constant 4 True

binary

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 8000 8000 False
FixedLength Default Constant True True

varbinary

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 8000 8000 False
FixedLength Default Constant False True

varbinary(max)

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2000.

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Default Constant 214748364780 True
FixedLength Default Constant False True

image

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Default Constant 2147483647 True
FixedLength Default Constant False True

timestamp

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Default Constant 8 True
FixedLength Default Constant True True

rowversion

n/a

Edm.Binary

Facet name Attribute name Value
MaxLength Default Constant 8 True
FixedLength Default Constant True True

smalldatetime

n/a

Edm.DateTime

Facet name Attribute name Value
Precision Default Constant 0 True

datetime

n/a

Edm.DateTime

Facet name Attribute name Value
Precision Default Constant 3 True

date

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2005 and SQL Server 2000.

n/a

Edm.DateTime

Facet name Attribute name Value
Precision Default Constant 0 Flase

time

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2005 and SQL Server 2000.

n/a

Edm.Time

Facet name Attribute name Value
Precision Default Constant 7 Flalse

datetime2

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2005 and SQL Server 2000.

n/a

Edm.DateTime

Facet name Attribute name Value
Precision Default Constant 7 Flalse

datetimeoffset

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2005 and SQL Server 2000.

n/a

Edm.DateTimeOffset

Facet name Attribute name Value
Precision Default Constant 7 Flalse

nvarchar

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2000.

n/a

Edm.String

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 4000 4000 False
Unicode Default Constant True True
FixedLength Default Constant False True

varchar

Bb896344.note(en-us,VS.100).gifNote:
This type is not supported in SQL Server 2000.

n/a

Edm.String

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 8000 8000 False
Unicode Default Constant False True
FixedLength Default Constant False True

char

n/a

Edm.String

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 8000 8000 False
Unicode Default Constant False True
FixedLength Default Constant True True

nchar

n/a

Edm.String

Facet name Attribute name Value
MaxLength Minimum Maximum Default Constant 1 4000 4000 False
Unicode Default Constant True True
FixedLength Default Constant True True

varchar(max)

n/a

Edm.String

Facet name Attribute name Value
MaxLength Default Constant 2147483647 True
Unicode Default Constant False True
FixedLength Default Constant False True

nvarchar(max)

n/a

Edm.String

Facet name Attribute name Value
MaxLength Default Constant 1073741823 True
Unicode Default Constant True True
FixedLength Default Constant False True

ntext

Attribute name Value
Equal comparable False
Order comparable False

Edm.String

Facet name Attribute name Value
MaxLength Default Constant 1073741823 True
Unicode Default Constant False True
FixedLength Default Constant False True

text

Attribute name Value
Equal comparable False
Order comparable False

Edm.String

Facet name Attribute name Value
MaxLength Default Constant 2147483647 True
Unicode Default Constant False True
FixedLength Default Constant False True

Unique

identifier

Attribute name Value
Equal comparable True
Order comparable True

Edm.Guid

n/a

xml

Attribute name Value
Equal comparable False
Order comparable False

Edm.String

Facet name Attribute name Value
MaxLength Default Constant 1073741823 True
Unicode Default Constant True True
FixedLength Default Constant False True

See Also

Other Resources

CSDL, SSDL, and MSL Specifications