Complex types are data types with internal structures but without Key properties. They are represented as light-green shapes on the diagram.
Complex types enable scalar properties to be organized within entities. The fields of these objects are mapped to the same record in the database table as the fields of the parent entity.
When you work with objects that represent complex types, be aware of the following points:
There are three ways to create a complex type. They are described below.
To create a complex type from the existing entity, you have to select properties from this entity and create complex type based on them. For example, you have a Company entity and want to create a complex type describing Address. To do this, perform the following steps:

1. Click the Address property in the Company class, then press SHIFT and click the Country property holding the SHIFT key.
2. Drag the selected properties out of the Company class and drop them on the empty diagram space.
3. In the displayed Model Refactoring dialog, click New complex type and then click OK.
4. The new complex type is created. You can edit its properties using Type Editor. To load Type Editor, double-click the complex type or select Edit from the complex type popup menu.

To create a new complex type, perform the following steps:
1. Right-click the Complex Types node in the Model Explorer and select New Complex Type from the shortcut menu.
2. The new complex type is added to the model. Double-click it to edit the set of properties.
Note
To add a property to the newly-added complex type use one of the following options. Select the complex type and press the INSERT key - this will add a new property, or press ALT+P - this will call the Property Editor dialog allowing you to configure the new property immediately. When working with the Type Editor dialog, right-click in the Properties area of the dialog and select the Add Property command from the shortcut menu, or press the INSERT key. To edit a property, right-click it and select the Edit Property command from the shortcut menu or press ENTER to display the Property Editor dialog. To remove a property from the Properties area of the Type Editor dialog, right-click the property and select the Delete Property from the shortcut menu or press the DELETE key.
A complex type created in this way is not mapped initially which is indicated in the Error List window with the corresponding warning message: The complex type `<type name>` is not used by any object within the model.
There are several ways to create a new complex type besides the described one:
To return a complex type from the method, do the following:
1. Include the functions or stored procedures to the model during its creation. You can use stored procedures and functions which return recordset and all of their input parameters can be null.

2. A new complex type is created automatically. You can edit it as described in the previous chapter.
To delete a complex type use one of the following options:
Entity Developer will then ask you whether you want to delete the object from the model too.