O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating complex objects

The Entity Model Designer couldn’t make it easier to create a single complex object. You just select the properties you want to abstract, right-click them and choose Refactor into New Complex Type from the context menu. The designer creates the class and handles the mapping for you:

Image

Once you choose Refactor into New Complex Type, Entity Framework doesn’t ask any more questions. It just does it. It creates the complex type, replaces the original properties with a single complex property, and fixes up the mappings:

Image

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required