Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ActionResult Create()
 {
     var viewModel = new CreateMethodViewModel();
     return View(viewModel);
 }