
C# 7 and .NET Core: Modern Cross-Platform Development

In ASP.NET Core MVC, the model represents the data required for a request. For example, an HTTP GET request for http://www.example.com/products/details/3 might mean that the browser is 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.
In the following example, we will create an Entity Framework Core data model to directly access data in the Northwind database.
Good Practice
Use a data repository (typically implemented as a service) to manage your data instead of accessing it directly in an ASP.NET Core MVC web application.
Follow the instructions in Chapter 8, Working with Databases Using the Entity Framework Core, to create the Northwind database:
Change the font size
Change margin width
Change background colour