Пример #1
0
        public void UpdateProfileByEmployee(UpdateProfileViewModel updateProfile)
        {
            Employee profile = null;

            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <UpdateProfileViewModel, Employee>();
                cfg.IgnoreUnmapped();
            });

            IMapper mapper = config.CreateMapper();

            profile = mapper.Map <UpdateProfileViewModel, Employee>(updateProfile);

            er.UpdateProfileByEmployee(profile);
        }