Hey,
I have been working on a project and due to some strange requirements I was wondering if I can make an overload of CreateMap function.
I have a "MyEntity" class and "MyViewModel" class, and I am using AutoMapper to convert "MyEntity" to "MyViewModel", now I have two scenarios to convert them,
Scenario 1: Map all the fields regardless of any condition (When I am mapping data to show on edit page)
Scenario 2: Map some fields conditionally, and Ignore some fields regardless of anything (When I am mapping the data saved in db on the data posted back from edit form)
So, Can i make another CreateMap? or an overload of CreateMap<MyEntity, MyViewModel>? or a workaround?
Thanks in Advance, Any help will be aprreciated.
Regards,
Riaz Raza