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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.