Пример #1
0
        public void UpdateAnswer(EditAnswerViewModel avm)
        {
            var     config = new MapperConfiguration(cfg => { cfg.CreateMap <EditAnswerViewModel, Answer>(); cfg.IgnoreUnMapped(); });
            IMapper mapper = config.CreateMapper();
            Answer  a      = mapper.Map <EditAnswerViewModel, Answer>(avm);

            ar.UpdateAnswers(a);
        }