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 that 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 cannot 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 are to appear in this sequence:  Documentation, AnnotationElement.

Graphic representation in table format of the rules that apply to the EntitySet element.

All child elements are to appear in the order indicated.