User-166373564 posted
Based on your requirement, the profile is a good way to organize your mapping configuration, and the configuration within a profile would only be applied to maps inside a profile.
Mapper.Initialize(cfg =>
{
cfg.AddProfile(new MyProfile1());
cfg.CreateMap<A, C>();
});
public class MyProfile1 : Profile
{
public MyProfile1()
{
this.RecognizeDestinationPrefixes("Cust_");
this.CreateMap<A, B>();
}
}
I did not found any other better approaches, you could try to follow here for potential tutorials.
Moreover, for the profile approach, you could automatically scan the profiles across assmeblies, details you could follow the section about Assembly
Scanning for auto configuration.