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

Complex types

Image

Back in Chapter 1 we saw that decomposition is the fundamental technique for normalizing a database. Similarly, you might find that there are OOP reasons for abstracting a group of properties from an entity in the conceptual model into a separate class. At this level, you’re not as likely to be concerned with duplicate data as about duplicate code. Either the property group is present in more than one entity and you don’t want to duplicate the code, or (less often) you don’t want to contaminate the primary entity with functionality that only applies to the group. Here’s an example:

These two entities aren’t related to each other, ...

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