-
Notifications
You must be signed in to change notification settings - Fork 0
2. Models
Brett edited this page May 8, 2016
·
1 revision
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
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
- Commit: 520e6319630c27f0f6eeb54abe7ed6e7dd1fc695
- File: wave/WavePoetry/WavePoetry.DataAccess/ContactData.cs
- Method: Update()
- Link: https://github.com/ericjohnolson/wave/blob/520e6319630c27f0f6eeb54abe7ed6e7dd1fc695/WavePoetry/WavePoetry.DataAccess/ContactData.cs#L135
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.