I want to create application with layered architecture. I have separate
- Model project with only model classes
- Data project responsible for CodeFirst configuration, migrations, etc.,
- Service project responsible for business logic, and preserving the data in the database using EF
- Dto project with classes used between Web app and service
- Web project with asp.net mvc application.
My goal was to separate these projects so that Web project knows nothing about Model and Data - it just consumes Service using Dto classes, so the Web project should just reference Service and Dto. Everything was great until I configured Asp.Net Identity - in order to configure authorization I had to reference Data and Model project which I had wanted to avoid. Is it possible to achieve my goal, and (if so) how to do it.
My second question is: is my desing ok from the separation of concerns point of view?