Database Reference
In-Depth Information
Figure 4-7.
Adding an Entity Data Model
As we have discussed, there are three parts to an ASP.NET MVC application: model, view, and controller. We have
now completed the model creation part. Next we need to create a controller and then finally create the views. The
number of views is dependent on the amount of actions that are required to be performed through the controller.
Add a new controller, as shown in Figure
4-8
, by right-clicking on the Controllers folder and then selecting Add
Controller. Name the controller
CategoryController
.
Figure 4-8.
Adding a controller