MSDN Library

Complex Type (EDM)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The ComplexType in the Entity Data Model (EDM) is a data type with internal structure but without a Key property. The ComplexType is used to implement a property that has internal properties of its own.

Either an EntityType or a ComplexType can have a property declared as ComplexType. This property must be mapped as a complex property in the mapping specification.

The Address property of the following CCustomer entity is implemented as ComplexType.

<EntityType Name="CCustomer">
    <PropertyRef Name="CustomerId" />
  <Property Name="CustomerId" Type="Int32" Nullable="false" />
  <Property Name="CompanyName" Type="String" />
  <Property Name="ContactName" Type="String" />
  <Property Name="ContactTitle" Type="String" />
  <Property Name="Address" Type="Self.CAddress" Nullable="false" />

<ComplexType Name="CAddress">
  <Property Name="StreetAddress" Type="String" />
  <Property Name="City" Type="String" />
  <Property Name="Region" Type="String" />
  <Property Name="PostalCode" Type="String" />
  <Property Name="Country" Type="String" />
  <Property Name="Phone" Type="String" />
  <Property Name="Fax" Type="String" />

See Also

Community Additions

© 2015 Microsoft