Difference between Data Access Layer and Model in MVC

Active3 hr before
Viewed126 times

1 Answers


The Entity Data Model Wizard will appear. This wizard will guide you through the creation of the model layer. Since the model should be created based on the existing database recently added, select Generate from database and click Next.,In this task, you will create a data model to interact with the database added in the previous task.,Then click OK. When prompted to create the database click Yes. Creating the database ,In this task, you will populate the database with sample data when it is initially created using Code-First.

(Code Snippet - Models And Data Access - Ex1 storeDB)

public class StoreController: Controller {
      private MusicStoreEntities storeDB = new MusicStoreEntities();
load more v

Other "difference-access" queries related to "Difference between Data Access Layer and Model in MVC"