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 ...

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.