I am having an architecture issue, and I hope someone can point me in the right direction. My problem is: handling DTOs with one-to-many or many-to-many relationships.
I have 5 projects and they should mostly depending to the next one respectively.
- Service Layer : connect domain layer to outside world
- Domain : Entity, Value Object and so on, Heart of the sw
- DTO : Mapper - convert database row to domain object
- Repository : CRUD operations
- DAL : Using EF Code first approach to create database tables
But i cannot figure out how they should be referred with each other. I have tried few approach and end up with circular reference. Any suggestions are welcome.