Simple Types (EDM)
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 |
|---|---|---|
|
Represents fixed or variable length binary data. | ||
|
Represents the mathematical concept of two-value logic, such as true or false, yes or no, 0 or 1. | ||
|
Represents an unsigned 8-bit integer value. |
Byte | |
|
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. | ||
|
Represents a Time instance as an interval measured in milliseconds from an instance of DateTime. | ||
|
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. | ||
|
Represents a floating point number with 15-digit precision that can represent values with approximate range of ± 2.23e -308 through ± 1.79e +308. | ||
|
Represents a 16-byte (128 bit) GUID value. | ||
|
Represents a signed 16-bit integer value. | ||
|
Represents a signed 32-bit integer value. | ||
|
Represents a signed 64-bit integer value. | ||
|
SByte |
Represents an 8-bit signed integer. | |
|
Represents a floating point number with seven-digit precision that can represent values with approximate range of ± 1.18e -38 through ± 3.40e +38. | ||
|
Represents fixed or variable length character data. | ||
|
Represents an interval measured in milliseconds. |
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).