ComplexType (SSDL)

Within the Entity Data Model (EDM), a complex type in store schema design language (SSDL) is metadata describing the structure of storage for the data for the complex type. Complex type data is stored in the same table as the containing entity.

The following schema shows the Address properties as they exist in the database. Properties such as City, Region, PostalCode are columns of the same table as the SCustomer.

<Schema Namespace="CustomerComplexAddress.Store"
        Alias="Self" Provider="System.Data.SqlClient"
        ProviderManifestToken="2005"
        xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">

        <EntityContainer Name="dbo">
          <EntitySet Name="SCustomer"
  EntityType="CustomerComplexAddress.Store.SCustomer" />
        </EntityContainer>

        <EntityType Name="SCustomer">
          <Key>
            <PropertyRef Name="CustomerId" />
          </Key>
          <Property Name="CustomerId" Type="int" Nullable="false" />
          <Property Name="CompanyName" Type="nvarchar" MaxLength="50" />
          <Property Name="ContactName" Type="nvarchar" MaxLength="50" />
          <Property Name="ContactTitle" Type="nvarchar" MaxLength="50" />
          <Property Name="Address" Type="nvarchar" MaxLength="50" />
          <Property Name="City" Type="nvarchar" MaxLength="50" />
          <Property Name="Region" Type="nvarchar" MaxLength="50" />
          <Property Name="PostalCode" Type="nvarchar" MaxLength="50" />
          <Property Name="Country" Type="nvarchar" MaxLength="50" />
          <Property Name="Phone" Type="nvarchar" MaxLength="50" />
          <Property Name="Fax" Type="nvarchar" MaxLength="50" />
        </EntityType>
</Schema>

See Also

Tasks

How to: Create and Execute Object Queries with Complex Types (Entity Framework)

Concepts

ComplexType (CSDL)
ComplexType (MSL)