public static void CreateAutomaticMapping <TSrc, TDest>(this IMapperConfigurationExpression cfg)
 {
     cfg.CreateMap <TSrc, TDest>();
     cfg.CreateMap <TDest, TSrc>();
     cfg.CreateMissingTypeMaps = true;
     cfg.IgnoreUnmapped();
 }
示例#2
0
        public void CreateMapping(IMapperConfigurationExpression cfg)
        {
            cfg.CreateMap <GoalsVM, Goals>()
            .ForMember(d => d.GoalRemarks, opt => opt.MapFrom(s => s.GoalRemarksVM));

            cfg.IgnoreUnmapped();
        }
示例#3
0
        public void CreateMapping(IMapperConfigurationExpression cfg)
        {
            cfg.CreateMap <PersonVM, Person>();

            cfg.IgnoreUnmapped();
        }