Exemple #1
0
        public void UpdateProfileByAdmin(UpdateEmpProfileByAdminViewModel profile)
        {
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <UpdateEmpProfileByAdminViewModel, Employee>();
                cfg.IgnoreUnmapped();
            });
            IMapper mapper = config.CreateMapper();

            Employee employee = mapper.Map <UpdateEmpProfileByAdminViewModel, Employee>(profile);

            er.UpdateProfileByAdmin(employee);
        }