Share via


EntitySet 要素 (SSDL)

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

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

適用可能な属性

The following table describes the attributes that can be applied to the EntitySet element.

Bb387152.note(ja-jp,VS.100).gif注 :
次の表に記載されていない属性は、store のエイリアスで修飾される場合があります。このエイリアスは、https://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator 名前空間のエイリアスです。このような属性は、モデルの更新時にモデルの更新ウィザードで使用されます。

属性名 必須 Value

Name

有効

エンティティ セットの名前。

EntityType

有効

エンティティ型の完全修飾名。そのインスタンスは、エンティティ セットに格納されます。

Schema

いいえ

データベース スキーマ。

Table

いいえ

データベース テーブル。

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

次の例は、2 つの EntitySet 要素と 1 つの AssociationSet 要素を持つ EntityContainer 要素を示します。

<EntityContainer Name="ExampleModelStoreContainer">
  <EntitySet Name="Customers" 
             EntityType="ExampleModel.Store.Customers" 
             Schema="dbo" />
  <EntitySet Name="Orders" 
             EntityType="ExampleModel.Store.Orders" 
             Schema="dbo" />
  <AssociationSet Name="FK_CustomerOrders" 
                  Association="ExampleModel.Store.FK_CustomerOrders">
    <End Role="Customers" EntitySet="Customers" />
    <End Role="Orders" EntitySet="Orders" />
  </AssociationSet>
</EntityContainer>

参照

概念

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

その他のリソース

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