示例#1
0
        public void UpdateEmployeeProfile(EmployeeInfoViewModel evm)
        {
            var             config = new MapperConfiguration(cfg => { cfg.CreateMap <EmployeeInfoViewModel, ApplicationUser>(); cfg.IgnoreUnmapped(); });
            IMapper         mapper = config.CreateMapper();
            ApplicationUser e      = mapper.Map <EmployeeInfoViewModel, ApplicationUser>(evm);

            _hrRepository.UpdateEmployeeProfile(e);
        }
        public void UpdateEmployeeProfile(EmployeeProfileViewModel evm)
        {
            var      config = new MapperConfiguration(cfg => { cfg.CreateMap <EmployeeProfileViewModel, Employee>(); cfg.IgnoreUnmapped(); });
            IMapper  mapper = config.CreateMapper();
            Employee e      = mapper.Map <EmployeeProfileViewModel, Employee>(evm);

            hr.UpdateEmployeeProfile(e);
        }