public ActionResult Update(TemplateViewModel viewModel) { try { var request = viewModel.MapTo<UpdateTemplateRequest>(); var response = _templateService.UpdateTemplate(request); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(TemplateViewModel viewModel) { _templateService.CreateTemplate(viewModel.MapTo<CreateTemplateRequest>()); return RedirectToAction("Index"); }
public ActionResult Preview(TemplateViewModel viewModel) { return View(viewModel); }