Export (0) Print
Expand All

2.1.18 EntitySet

An EntitySet element is a named set that can contain instances of a specified EntityType element and any of the specified EntityType subtypes. More than one EntitySet for a particular EntityType can be defined.

The following is an example of the EntitySet element.

    <EntitySet Name="CustomerSet" EntityType="Model1.Customer" />

The following rules apply to the EntitySet element:

  • EntitySet MUST have a Name attribute defined. Name attribute is of type SimpleIdentifier.

  • EntitySet MUST have an EntityType defined.

  • The EntityType of an EntitySet MUST be in scope of the Schema that declares the EntityContainer in which this EntitySet resides.

  • EntitySet can have an abstract EntityType. An EntitySet for a given EntityType can contain instances of that EntityType and any of its subtypes.

  • Multiple EntitySet elements can be defined for a given EntityType.

  • EntitySet can contain any number of AnnotationAttribute attributes. The full names of the AnnotationAttribute attributes MUST NOT collide.

  • EntitySet elements can contain a maximum of one Documentation element.

  • EntitySet can contain any number of AnnotationElement elements.

  • In CSDL 3.0, EntitySet can contain any number of ValueAnnotation elements.

  • Child elements of EntitySet MUST appear in this sequence: Documentation, AnnotationElement.

EntitySet element table

All child elements MUST appear in the order indicated.

 
Show:
© 2014 Microsoft