This documentation is archived and is not being maintained.

EntityType Element (SSDL)

An EntityType element in store schema definition language (SSDL) represents a row in a table or view of the underlying database. An EntitySet element in SSDL represents the table or view in which rows occur. The EntityType attribute of an EntitySet element specifies the particular SSDL entity type that represents rows in an SSDL entity set. The mapping between an SSDL entity type and a CSDL entity type is specified in an EntityTypeMapping element.

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

Applicable Attributes

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

Attribute Name Is Required Value



The name of the entity type. This value is usually the same as the name of the table in which the entity type represents a row. This value can contain no periods (.).

Any number of annotation attributes (custom XML attributes) may be applied to the EntityType element. However, custom attributes may not belong to any XML namespace that is reserved for SSDL. The fully-qualified names for any two custom attributes cannot be the same.


The following example shows an EntityType element with two properties:

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

See Also