public ActionResult DeleteQuestionPost(int testId, int page, int questionId) { var question = new QuestionEntity { Id = questionId }; questionService.Delete(question); var editModel = PrepareEditModel(page, 5, testId); if (Request.IsAjaxRequest()) return PartialView("_Questions", editModel); else return RedirectToAction("Edit", new { testId, page }); }
public void Delete(QuestionEntity question) { questionRepo.Delete(question.ToDalQuestion()); uow.Commit(); }