Project Architecture is like this:
MyProject.DataAccessLayer: will communicate with database using Entity FrameworkMyProject.BusinessLayer: application business logic will be hereMyProject.API: WebAPIApiControllerswill return the data from business layer methods
My question is that, if I have created an Entity Framework as separate project in the DataAccessLayer, how can I use the model classes from the DataAccessLayer?
Should I add a reference to MyProject.API to access the model classes? If this is the case, why would I need the MyProject.BusinessLayer?
Edited
Sample code for business layer:
public async Task<List<TigerNest.Dao.Area>> GetArea()
=> await yatraDao.GetArea();
ApiController:
YatraManager manager = new YatraManager();
var result = await manager.GetArea();
return Ok(result);
In the ApiController, the BusinessLayer returns a collection of areas. It forces me to add reference to the Dao project.

API (uses the )-> Business (uses the)-> DA Layer.