コード例 #1
0
 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" }
             });
 }
コード例 #2
0
 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" }
             });
 }