public async Task<ActionResult> Delete(Guid id, AreYouSureModel model) { Project project = await databaseService.GetProject(id); await databaseService.DeleteProject(id); FlashHelper.Add(string.Format("{0} have been deleted.", project.Name), FlashType.Notice); return new RedirectToRouteResult(new RouteValueDictionary(){ { "controller", "Measurements" }, { "action", "Index" } }); }
public async Task<ActionResult> Delete(string username, AreYouSureModel model) { await userService.DeleteUser(username); FlashHelper.Add(string.Format("{0} have been deleted.", username), FlashType.Notice); return new RedirectToRouteResult(new RouteValueDictionary(){ { "controller", "Account" }, { "action", "Index" } }); }