AutoMapper is an object-object mapper. Object-object mapping works by transforming an input object of one type into an output object of a different type. What makes AutoMapper interesting is that it provides some interesting conventions to take the dirty work out of figuring out how to map type A to type B. As long as type B follows AutoMapper’s established convention, almost zero configuration is needed to map two types.
Why do we need to use AutoMapper?
When we have to map two different objects we can use AutoMapper. One of the problems is, while building the application we have some entities which are dealing with DB (forex DTO’s) and for some entities we are dealing with a client. So we have to map those DTO’s to the entities dealing with clients