- Migration commands are executed in this layer
- This layer uses models to access data from db
- Controllers are present here
- We add reference to above two layers in this project
. ├── DataAccess │ ├── Context │ │ └── WorkDBContext.cs │ ├── Migrations │ └── Models │ ├── Department.cs │ └── Employee.cs ├── CompanyService │ ├── Interfaces │ │ ├── IDepartmentService.cs │ │ └── IEmployeeService.cs │ └── Services │ ├── DepartmentService.cs │ └── EmployeeService.cs ├── WebAPI │ ├── Controllers │ │ ├── DepartmentController.cs │ │ └── EmployeeController.cs │ ├── Photos │ ├── Properties │ │ └── launchSettings.cs │ ├── Program.cs │ ├── Startup.cs │ └── appsettings.json └── ...
- Build fail because of namespace not found issues
- Reference the DataAccess.dll and CompanyService.dll for WebAPI Project from RefDll folder inside WebAPI Project
- Reference to the DataAccess.dll for CompanyService Project from same folder
- Database connection error or Object not found error
- Run Update-database command from nuget package manager console, Selecting the DataAccess Project from Dropdown of the console