次の方法で共有


Type Attribute (EntityType CSDL)

In the Entity Data Model (EDM), the Type attribute of a Property element specifies the data type that can be assigned to instances of the type.

The following definition of the Department entity includes four Property elements. Each property has a Type attribute that has an assigned data type. For example, the DepartmentID property assignment is Type="Int16". The DepartmentID property is also designated the Key property of the Department entity.

  <EntityType Name="Department" >
    <Key>
        <PropertyRef Name="DepartmentID">
    </Key>
    <Property Name="DepartmentID" Type="Int16" Nullable="false" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="GroupName" Type="String" Nullable="false" />
    <Property Name="ModifiedDate" Type="DateTime" Nullable="false" />
  </EntityType>

See Also

Concepts

Key Attribute (EntityType CSDL)
EntityType Element (SSDL)