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

            ar.InsertAnswer(a);
        }