CHAPTER 6

image

Models

This chapter describes the last of the three core parts of an ASP.NET MVC application: models.

Several different types of models exist, but this chapter narrows the scope to the three MVC pattern model types that are most relevant when developing MVC applications: the data model, the business model, and the view model.

The data model is particularly important because it allows you to interact with the database. The business model is used to perform general processing and in most cases it interacts with the data model to obtain data from the database and save data back to the database. View models are classes in charge of passing ...

Get Beginning ASP.NET MVC 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.