共用方式為


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.

The simple data types described in the following table are well-known abstract concepts, such as integer, float, and DateTime.

The following table describes the EDM simple types:

Type Description

Binary (EDM)

Represents fixed or variable length binary data.

Boolean (EDM)

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

DateTime (EDM)

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.

DateTimeOffset (EDM)

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

Time (EDM)

Represents an interval measured in milliseconds.

Decimal (EDM)

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.

Single (EDM)

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

Double (EDM)

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

Guid (EDM)

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

Int16 (EDM)

Represents a signed 16-bit integer value.

Int32 (EDM)

Represents a signed 32-bit integer value.

Int64 (EDM)

Represents a signed 64-bit integer value.

Byte (EDM)

Represents an unsigned 8-bit integer value.

String (EDM)

Represents fixed or variable length character data.

Facets (EDM)

Represents constraints or other specifications on data types declared for properties.

For more information about the provider manifest and how simple types are mapped to storage metadata, see Types (Metadata).

Mapping Simple Types

The EDM is an abstract type system that is used to define simple types, such as String, Boolean, DateTime, and so on. These data types have no internal properties.

The EDM method suggests default mapping of these types to the corresponding primitive types in other data type systems that can host or instantiate EDM instances, such as common language runtime (CLR), SQL, and XSD.

The EDM does not specify operational or conversion semantics on simple types. Instead, instances of simple types use the semantics of the hosting type system.

See Also

Concepts

Entity Data Model Types