MVC Developer Question:
Tell me what are the Folders in MVC application solutions?
Answer:
When you create a project a folder structure gets created by default under the name of your project which can be seen in solution explorer. Below I will give you a brief explanation of what these folders are for.
☛ Model: This folder contains classes that is used to provide data. These classes can contain data that is retrieved from the database or data inserted in the form by the user to update the database.
☛ Controllers: These are the classes which will perform the action invoked by the user. These classes contains methods known as "Actions" which responds to the user action accordingly.
☛ Views: These are simple pages which uses the model class data to populate the HTML controls and renders it to the client browser.
☛ App_Start: Contains Classes such as FilterConfig, RoutesConfig, WebApiConfig. As of now we need to understand the RouteConfig class. This class contains the default format of the URL that should be supplied in the browser to navigate to a specified page.
☛ Model: This folder contains classes that is used to provide data. These classes can contain data that is retrieved from the database or data inserted in the form by the user to update the database.
☛ Controllers: These are the classes which will perform the action invoked by the user. These classes contains methods known as "Actions" which responds to the user action accordingly.
☛ Views: These are simple pages which uses the model class data to populate the HTML controls and renders it to the client browser.
☛ App_Start: Contains Classes such as FilterConfig, RoutesConfig, WebApiConfig. As of now we need to understand the RouteConfig class. This class contains the default format of the URL that should be supplied in the browser to navigate to a specified page.
Previous Question | Next Question |
Tell us what are Action Filters in MVC? | Tell me what is the greatest advantage of using asp.net mvc over asp.net webforms? |