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

8. Controlling The Schema

In the last chapter we explored the basic process for creating a database and an Entity Framework model starting with a class hierarchy rather than a model. We also took a look at some basic ways that you can control what Entity Framework will do (and when it will do it) when it creates the model (and possibly the database).

But as reasonable as the basic Code First conventions are, there are some things that Entity Framework can’t work out by itself. Complicated relationships, for example, or some database-specific attributes of the table fields. Fortunately, there are several ways you can control the ultimate database, and we’ll examine two in this chapter.

Data annotations are a set of metadata attributes that work ...

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