public IActionResult Create(FaqViewModel faq) { if (ModelState.IsValid) { Faq model = _mapper.Map <FaqViewModel, Faq>(faq); _faqRepository.CreateFaq(model); return(RedirectToAction("index")); } return(View(faq)); }