In which layer should contain AutoMapper configurations?
AutoMapper is to map ViewModels to my Domain Entities.
I have three layers in my app: Domain, UI (MVC), Infrastructure.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It should live in the top most layer that it is translating to/from.
If you have mappers between domain and infra, then they should live in domain (assuming that uses infra).
If you have mappers between UI and domain, then they should live in UI (assuming that uses domain).
This means that the lower down layers do not know or need to know about the layers higher up.