Skip to content

2. Models

Brett edited this page May 8, 2016 · 1 revision

Models

While there are models that represent the database entities in wave/WavePoetry/WavePoetry.DataAccess/, the models used in the ASP.NET MVC web project are different. They are located in wave/WavePoetry/WavePoetry.Model/. The files are:

  • AdminViewModel.cs
  • Award.cs
  • Contact.cs
  • Review.cs
  • Shipment.cs
  • Title.cs

Mapping the View Models to the DbContext Models

In order to save data that it is located in a view model, it is usually mapped from the view model to the corresponding DbContext model. An example of this can be found at the at the following location

Other view models

Not all of the view models correspond to database entities. For example, there is ContactSearch, which just represents a view used to search for contacts.

Clone this wiki locally