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 code

We won’t be workiing directly with the XML (or at least not any more than we can help), but we will be working with the code files that the Wizard generates. When you create a model using the Model-First workflow, the Wizard creates a single file that contains partial class definitions for the entity objects in the model. We’ll be looking at the Entity Framework object model in detail in Chapter 7 (so don’t worry too much about learning all these details now), but here’s a quick peak:

The context

After the library imports (using in C#, imports in VB) and some metadata declarations, the file contains the definition for the context object. The partial class contains the following members:

Two constructors. One allows you to pass just ...

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