0

We have something below in AutoMapper

 public class AutomapperConfigure : IAutomapperConfigure
    {
        public void Config()
        {

            Mapper.Initialize(x =>
            {
                x.AddGlobalIgnore("EmployeeId");
            });

    }
}

I want something which will Just configure to ignore all unmapped properties from each and every destination mapping.

I dont want to manually create map for each and every type. I want it to be automatic. Automapper do auto mapping only when propeties in source and destination is same. If destination have one additional property mapping get failed and we are suppose to do manuall mapping like below.

Mapper.Initialize(x =>
            {
                x.CreateMap<EmployeeAddDTO, Employee>();
            });

I want to avoid this. I want all mapping(Future things as well) to happen in one go.

ANy thoughts, suggestion OR Advice for some other automapper (appreciated)

Sukesh Marla
  • 178
  • 11

0 Answers0