public ActionResult Create(CreateMethodViewModel viewModel) { var request = viewModel.MapTo<CreateMethodRequest>(); var response = _methodService.Create(request); TempData["IsSuccess"] = response.IsSuccess; TempData["Message"] = response.Message; if (response.IsSuccess) { return RedirectToAction("Index"); } return View("Create", viewModel); }
public ActionResult Create() { var viewModel = new CreateMethodViewModel(); return View(viewModel); }