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

The fluent API

Image

Data annotations are simple to use, but once you start adding information about how your classes map to the database they can no longer really claim to be persistence-ignorant. They can also get a little unwieldy—I’ve seen classes that had more metadata than code. The second method Entity Framework provides for customizing the model, the Fluent API, provides an alternative that is completely code-based and lets you confine all your database-related code to the context class.

The Entity Framework Fluent API is an example of a technique known as a FLUENT INTERFACE. (Neither has any relationship to the Fluent Learning series of which ...

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