-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

C# 6 and .NET Core 1.0

In MVC, the model represents the data required for a request. For example, an HTTP GET request for http://www.example.com/products/details/3
would mean you are asking for the details of product number 3.
The controller would need to use the ID value 3 to retrieve the record for that product and pass it to a view that can then turn the model into HTML for display in the browser.
For this initial example, we will create an Entity Data Model (EDM) to access data in the Northwind database.
Best Practice
Use a data repository (typically implemented as a service) to manage your data.
If you have not already installed the Northwind database, then follow the instructions at the beginning of Chapter 8, Working with Relational Data Using the Entity Framework.
On the Tools menu, choose NuGet Package Manager and then Package Manager Console.
In the PM>
prompt, enter the following commands:
Install-Package EntityFramework.MicrosoftSqlServer Install...
Change the font size
Change margin width
Change background colour