* Updated

Added note about adding Entity Framework via nuget

* Update adding-a-model.md
pull/3391/head
Matteo Tammaccaro 2017-05-19 06:32:41 +02:00 committed by Rick Anderson
parent 1713d67a67
commit 857f6fa9ba
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@ Add the following five properties to the `Movie` class:
We'll use the `Movie` class to represent movies in a database. Each instance of a `Movie` object will correspond to a row within a database table, and each property of the `Movie` class will map to a column in the table.
Note: In order to use System.Data.Entity, and the related class, you need to install the [Entity Framework NuGet Package](https://www.nuget.org/packages/EntityFramework/). Follow the link for further instructions.
In the same file, add the following `MovieDBContext` class:
[!code-csharp[Main](adding-a-model/samples/sample2.cs?highlight=2,15-18)]
@ -57,4 +59,4 @@ We've finally added a model (the M in MVC). In the next section you'll work with
>[!div class="step-by-step"]
[Previous](adding-a-view.md)
[Next](creating-a-connection-string.md)
[Next](creating-a-connection-string.md)