EntityType Element (CSDL)

The EntityType element defines a single entity within a data model. The bi:EntityType element extends the definition of EntityType used in the Entity Data Framework.

An EntityType element is specified for each of the entities that are included in the data model. The subelements of the EntityType describe the columns and measures in the table. Relationships among tables are included in the EntityContainer.

An EntityType element can have the following child elements, in the order listed:

  • Key Element

  • Property Element

  • NavigationProperty Element

Applicable Attributes

The table below describes the attributes found on the EntityType element, in addition to all attributes applicable to the EntityType element.

Attribute Name

Is Required

Value

Caption

No

A friendly display name for the entity. If no caption has been set in the model, no caption is displayed.

Collection

Yes

The name of the data model.

CollectionCaption

No

The plural name for the entity.

Contents

No

A value that indicates the type of data in the entity, with the following possible values. These values are based on the Analysis Services content types for dimensions and are optional:

  • Accounts

  • BillOfMaterials

  • Channel

  • Currency

  • Customers

  • Geography

  • Organization

  • Products

  • Promotions

  • Quantitative

  • Rates

  • Regular

  • Scenario

  • Time

  • Utility

DefaultDetails

No

A list of property references, which together represent the set of columns in the table.

DefaultImage

No

A reference to a column that contains the image used to illustrate the entity.

DisplayKey

A list of reference to columns or to role ends, constituting a strong identifier that can uniquely identify an entity instance to the user.

Documentation

No

The description of the entity.

IsTimeDimension

Yes

Indicates whether the entity is used as the time dimension.

Key

Yes

Indicates the column that is used as the key for the entity.

Name

Yes

The merged name of the cube dimension.

OriginEntityType

No

The merged name of the primary table. If this value is the same as the value for the EntityType name, the Entity is the original one.

Qualifier

No

A property that is set on the view and can be used by the client to distinguish properties from different views.

ReferenceName

Yes

The unmerged and fully qualified name of the entity.

Hidden

No

If True, indicates that the entity should be hidden from the client.

Example

The following excerpt shows part of the CSDL representation of the Date table used in a model.

<EntityType Name="Date">
            <Key>
              <PropertyRef Name="Date" />
            </Key>
            <Property Name="RowNumber" Type="Int64" Nullable="false">
              <bi:Property Hidden="true" Contents="RowNumber" Stability="RowNumber" />
            </Property>
            <Property Name="Date" Type="DateTime" Nullable="false">
              <bi:Property />
            </Property>
            <Property Name="DayNumberOfWeek" Type="Int64">
              <bi:Property />
            </Property>
            <Property Name="EnglishDayNameOfWeek" Type="String" MaxLength="Max" FixedLength="false">
              <bi:Property />
            </Property>
            <bi:EntityType Contents="Time" />
          </EntityType>
  </Association>