I have to create two different projects with the Entity Framework:
- Web API Services
- UI and Business Logic (MVC).
Both the projects have to work with same POCO entities. I see two alternatives and would like to know the pros and cons of each, and if one of the two to be recommended as best option:
- Make a different class library for the complete entity model and take its reference in both the projects?
- Create the class library just for POCO entities, take its reference in both the projects and use code first approach in services project (creating the context class) for database access?
Also would like to know to best structure my projects when I have three different servers, one for the web services, one for the UI and one for the database. On the other hand, if I have to follow database first approach, how do I deal with such situation?