Share via


EntityType 要素 (SSDL)

ストア スキーマ定義言語 (SSDL) の EntityType 要素は、基になるデータベースのテーブルの行またはビューを表します。 SSDL の EntitySet 要素は、行が発生するテーブルまたはビューを表します。 EntitySet 要素の EntityType 属性は、SSDL エンティティ セット内の行を表す特定の SSDL エンティティ型を指定します。 SSDL のエンティティ型と CSDL のエンティティ型 間のマッピングは、EntityTypeMapping 要素で指定されます。

The EntityType element can have the following child elements (in the order listed):

適用可能な属性

The table below describes the attributes that can be applied to the EntityType element.

属性名 必須 Value

Name

有効

エンティティ型の名前。 通常、この値は、エンティティ型が行を表すテーブルの名前と同じです。 この値にピリオド (.) を含めることはできません。

Bb399579.note(ja-jp,VS.100).gif注 :
EntityType 要素には、任意の数の annotation 属性 (カスタム XML 属性) を適用できます。However, custom attributes may not belong to any XML namespace that is reserved for SSDL.カスタム属性の完全修飾名は一意である必要があります。

次の例は、2 個のプロパティがある EntityType 要素を示しています。

<EntityType Name="Customers">
  <Documentation>
    <Summary>Summary here.</Summary>
    <LongDescription>Long description here.</LongDescription>
  </Documentation>
  <Key>
    <PropertyRef Name="CustomerId" />
  </Key>
  <Property Name="CustomerId" Type="int" Nullable="false" />
  <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
</EntityType>

参照

概念

エンティティ フレームワークの概要
SSDL 仕様

その他のリソース

CSDL、SSDL、および MSL 仕様
ADO.NET Entity Data Model Tools