Database Reference
In-Depth Information
Figure 8-5. A model for an employee. The Name property is a complex type, composed of FirstName and LastName
Complex types are supported with POCO. When we refactor two or more entity properties to a new complex type,
a new class is generated by default for that complex type. A property of the complex type class is also added into the
main entity POCO class. Only classes are supported, as Entity Framework generates these while saving new complex
types. The code in Listing 8-6 illustrates using the Name class for the complex type representing the employee's
FirstName and LastName.
 
Search WWH ::




Custom Search