public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } int faqId = id ?? default(int); var faq = _repository.GetFAQ(faqId); if (faq == null) { return(NotFound()); } FaqVM model = new FaqVM(); model.Faq = faq; return(View(model)); }