public async Task <IActionResult> Edit(DashboardDetailViewModel model) { if (ModelState.IsValid) { try { await _dashboardContentService.EditAsync(model.DashboardContent); ShowAlertSuccess("Dashboard content was successfully edited!"); return(RedirectToAction("Edit", new { id = model.DashboardContent.Id })); } catch (GraException gex) { ShowAlertDanger("Unable to edit content: ", gex); } } PageTitle = "Edit Content"; return(View("Detail", model)); }