public ActionResult CreateTest(TestViewModel test) { var testFromDomain = _advancedMapper.MapTestViewModel(test); _highLevelTestManagementService.CreateTest(testFromDomain); return(RedirectToAction("TestManagement", "Admin")); }
public ActionResult CreateTest(TestViewModel test) { if (ModelState.IsValid) { if (test.TestTimeLimit == null) { test.TestTimeLimit = new TimeSpan().ToString(); } if (test.QuestionTimeLimit == null) { test.QuestionTimeLimit = new TimeSpan().ToString(); } var testFromDomain = _advancedMapper.MapTestViewModel(test); _highLevelTestManagementService.CreateTest(testFromDomain); if (testFromDomain != null) { return(RedirectToAction("TestManagement", "Admin")); } return(HttpNotFound()); } return(View(test)); }
public void CreateTest(TestViewModel test) { var testFromDomain = _advancedMapper.MapTestViewModel(test); _highLevelTestManagementService.CreateTest(testFromDomain); }