Export (0) Print
Expand All

Simple Types (EDM)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Primitive types derived from the Entity Data Model (EDM) SimpleType are used in EDM schemas to specify the valid content of properties of entities. In the EDM system, simple data types identify single-value types.

When an object layer is generated by the Entity Data Model tools, data classes are created based on the entity types in the conceptual model. The return types of the properties of these data classes are determined based on a default mapping between CLR types and simple types in the Entity Framework.

The following table describes the Entity Framework simple types and the corresponding CLR type in the default mapping:

Type Description Default CLR Type Mapping

Binary

Represents fixed or variable length binary data.

Byte

Boolean

Represents the mathematical concept of two-value logic, such as true or false, yes or no, 0 or 1.

Boolean

Byte

Represents an unsigned 8-bit integer value.

Byte

DateTime

Represents a date and time with values ranging from 12:00:00 midnight, January 1, 0001 A.D. through 11:59:59 P.M, December 31, 2999 A.D. The maximum precision is milliseconds.

DateTime

DateTimeOffset

Represents a Time instance as an interval measured in milliseconds from an instance of DateTime.

DateTimeOffset

Decimal

Represents numeric values with fixed precision and scale. This type can describe a numeric value ranging from negative 10^38 + 1 to positive 10^38 -1.

Decimal

Double

Represents a floating point number with 15-digit precision that can represent values with approximate range of ± 2.23e -308 through ± 1.79e +308.

Double

Guid

Represents a 16-byte (128 bit) GUID value.

Guid

Int16

Represents a signed 16-bit integer value.

Int16

Int32

Represents a signed 32-bit integer value.

Int32

Int64

Represents a signed 64-bit integer value.

Int64

SByte

Represents an 8-bit signed integer.

SByte

Single

Represents a floating point number with seven-digit precision that can represent values with approximate range of ± 1.18e -38 through ± 3.40e +38.

Single

String

Represents fixed or variable length character data.

String

Time

Represents an interval measured in milliseconds.

TimeSpan

For more information about the provider manifest and how simple types are mapped to storage metadata, see Types (Metadata). For information about the mapping between these simple types and SQL Server types, see .NET Framework Data Provider for SQL Server Types (Entity Framework).

See Also

Community Additions

Show:
© 2014 Microsoft