6. Designer Options

In the last chapter you had a quick peek at adding a code generation item to an Entity Framework model in order to control, well, the code it generates. In this chapter we’ll look at this process in more detail. As you’ll see, Entity Framework provides templates for three common code strategies: entity objects (which you get by default, but using the template provides more control), the DbContext objects that we examined in the last chapter, and self-tracking entities, which are useful in n-tier applications (we’ll use them in the final project in Chapter 10).

These templates are provided by the Entity Framework team. (If you search the template gallery, you’ll find others that are provided by the team or by members of the ...

Get Fluent Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.