次の方法で共有


Type 属性 (EntityType CSDL)

エンティティ データ モデル (EDM) では、Property 要素の Type 属性は、型のインスタンスに割り当てることのできるデータ型を指定します。

次の Department エンティティの定義には、4 つの Property 要素が含まれています。各プロパティには、割り当てられたデータ型を指定する Type 属性があります。たとえば、DepartmentID プロパティの割り当ては、Type="Int16" です。DepartmentID プロパティには、Department エンティティの Key プロパティも指定されます。

  <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>

参照

概念

Key 属性 (EntityType CSDL)
EntityType 要素 (SSDL)