Пример #1
0
        public ActionResult DeleteAnswerPost(int answerId, int testId, int page)
        {
            AnswerEntity answer = new AnswerEntity { Id = answerId };
            answerService.Delete(answer);

            var editModel = PrepareEditModel(page, 5, testId);

            if (Request.IsAjaxRequest())
                return PartialView("_Questions", editModel);
            else
                return RedirectToAction("Edit", new { testId, page });
        }
Пример #2
0
 public void Delete(AnswerEntity answer)
 {
     answerRepo.Delete(answer.ToDalAnswer());
     uow.Commit();
 }