Last post Apr 19, 2018 06:24 AM by Angie xu - MSFT
Apr 18, 2018 07:30 PM|mandrews1234|LINK
I want to remove a prefix from my source object, but I'd like to do it for each map an not globally, as it could cause issues where it's removing a column when it shouldn't. Is there an easy way to do this? This is what I'm working with right now
public partial class MappingProfile : Profile
//I would prefer this not to be a global and only remove the prefix on the specific map below
Apr 19, 2018 06:24 AM|Angie xu - MSFT|LINK
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.
public class MyProfile1 : Profile
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.