Example #1
0
        public ActionResult Create(CreateLevelViewModel viewModel)
        {
            var request  = viewModel.MapTo<CreateLevelRequest>();
            var response = _levelService.Create(request);
            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"] = response.Message;
            if (response.IsSuccess)
            {
                return RedirectToAction("Index");
            }

            return View("Create", viewModel);
        }
Example #2
0
 public ActionResult Create()
 {
     var viewModel = new CreateLevelViewModel();
     return View(viewModel);
 }