Complex types repeat structural patterns in your database. You must configure them because there is no way to output it.
An example is two tables in which both columns are associated with an address:
Company
CompanyName AddressLine1 AddressLine2 Postcode
Account manager
Name TelephoneNumber SuperiorName AddressLine1 AddressLine2 Postcode
This is clearly not a normalized database design, but such situations do occur. You can abstract the model for an address into a complex type, and then specify that both Company and AccountManager have this complex type, and do not preserve the mapping of the mapping columns (although separate in the database) for each table with the address columns.
Here's an in-depth article on complex types: http://msdn.microsoft.com/en-gb/data/jj680147.aspx
And here is one that is not so heavy, and shows the advantage of comparing two addresses on the same model: http://visualstudiomagazine.com/articles/2014/04/01/making-complex-types-useful.aspx
source share