Easyfieds is developed in modular fashion. In this section we will go into details of each module and inner workings of its structure.
The project is developed with ASP .Net MVC with the following modules and file structurs. Check the explanation below the tree.
This is the main ASP .Net MVC Web Project in the solution. Users will be interacting with this module in their browsers. For Dashboard Panel, we have created a separate area named
Dashboard which have separate routes, controllers, models and views.
We have Controllers in two places in the project. One is in main Controllers folder and another is Dashboard Area Controllers folder.
Similar to Controllers, we have views in two Views folders. One is in main Views folder and the other is in Dashboard Area Views folder.
View models have their own separate ViewModels folder. Each file in ViewModels folder contain many ViewModel classes.
The project also implements custom error pages which you can find in the main folder. Local development does not show these error pages as it is recommended to only be shown on the released environment. You can change this setting in
web.config file. Learn more about Error Pages in MVC in this Link.
This module is a Class Library Project in the main solution. This is responsible for handling everything related to Database. Easyfieds uses Entity Framework Code First Migrations to create database.
AppDataContext class is derived from DbContext class of Entity Framework. Read more details of Database creation/setup etc in Setup section.
This module is also a Class Library Project which act as intermediary between App.Data database module and App.Web UI module.
This module is also Class Library Project in the solution. This project contain all the business entities/classes. This is referenced in all other projects in the main solution.
This module contain a helpers, extensions, attributes and common enums that are shared accross all the other projects in the solution.