Database Reference
In-Depth Information
Figure 2-6. Generating the storage model in the .edmx file and creating the database script
12.
Run the database script in an SSMS query window to create the database and the
People table.
How It Works
The Entity Framework Designer is a powerful tool for creating and updating a conceptual model, storage model,
and mapping layer. This tool provides support for bidirectional model development. You can either start with a clean
design surface and create a model; or start with a database that you already have and import it to create a conceptual
model, storage model, and mapping layer. The current version of the Designer supports somewhat limited roundtrip
modeling, allowing you to re-create your database from a model and update the model from changes in your
database.
The model has a number of properties that affect what goes in the generated storage model and database script.
We changed two of these properties. The first was the name of the container. This is the class derived from DbContext.
We called this EF6RecipesContext to be consistent with the contexts we use throughout this topic.
Additionally, we changed the schema to “Chapter 2.” This represents the schema used to generate the storage
model as well as the database script.
 
Search WWH ::




Custom Search