Exemplo n.º 1
0
        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 });
        }
Exemplo n.º 2
0
 public void Delete(QuestionEntity question)
 {
     questionRepo.Delete(question.ToDalQuestion());
     uow.Commit();
 }