MVC5 Classic
Step 3 of 5: Add a Reference to the Entity Framework

Adding a reference to the EntityFramework.SqlServerCompact library allows you to define the object model without having any database, and when you run the project, the database will be created dynamically.

In this example, you'll use the Code First approach in Entity Framework 4. This allows you to develop without a designer or XML mapping file.

  1. Right-click the project name and select Manage NuGet Packages.
  2. Under Installed Packages, select Online, and enter "EntityFramework.SqlServerCompact" in the Search Online text box.

  3. Click Install and when it's finished, click I Accept.
  4. Click Close to close the Add Library Package Reference dialog box.
  5. In the Solution Explorer, right-click the project name and select Build to make sure the object model is compiled.

In the next step, you'll add controllers to the project.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback