Updated (#3375)
* Updated Added note about adding Entity Framework via nuget * Update adding-a-model.mdpull/3391/head
parent
1713d67a67
commit
857f6fa9ba
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue