public void Create(TestEntity test) { DalTest dalTest = new DalTest { MinAmountOfCorrAnswers = test.MinAmountOfCorrAnswers, TimeLimit = test.TimeLimit, Title = test.Title }; testRepo.Create(dalTest); uow.Commit(); }
public ActionResult MakeTest(TestEntity test) { testService.Create(test); var testId = testService.GetAllTestEntities().Last().Id; return RedirectToAction("AddQuestion", new { testId }); }
public ActionResult Edit(TestEntity test, int page = 1) { testService.Update(test); if (Request.IsAjaxRequest()) { var editModel = PrepareEditModel(page, 5, test.Id); return PartialView("_Questions", editModel); } else return RedirectToAction("Edit", new { testId = test.Id }); //return View(test); }
public void Update(TestEntity entity) { testRepo.Update(entity.ToDalTest()); uow.Commit(); }
public void Delete(TestEntity entity) { testRepo.Delete(entity.ToDalTest()); uow.Commit(); }