コード例 #1
0
 public async Task <ActionResult> ResponseToScript(RespondToScriptModel model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             throw new Exception(ModelState.ErrorGathering());
         }
         await _scriptService.RespondToScript(model);
     }
     catch (Exception ex)
     {
         TempData["message"] = ex.Message;
     }
     return(RedirectToAction("Index", "Home"));
 }