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

Using templates

Image

In the last chapter I walked you through using the DbContext template to change the code that the Entity Model Designer produces. But I don’t want you to just memorize a series of steps, and that’s all you can do if you don’t understand why you’re doing them. So let’s back up now and look at what’s actually going on with this whole template business.

Two things work together to determine the code generated by the Entity Model Designer: the model’s Code Generation Strategy property and the Custom Tool property of the model file.

By default

When you set a code generation item

On Your Own

You don’t really need my help to change ...

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