Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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">
  <Key>
    <PropertyRef Name="CustomerId" />
  </Key>
  <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" />
</EntityType>

<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" />
</ComplexType>

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.