示例#1
0
 public ActionResult Delete()
 {
     try
     {
         _service.DeleteAllCountedWords();
         return(View("Index"));
     }
     catch (Exception e)
     {
         ViewData["ErrorMessage"] = e.Message;
         ViewData["ErrorStack"]   = e.StackTrace;
         ViewData["ErrorInner"]   = e.InnerException?.Message;
         return(View("Error"));
     }
 }
示例#2
0
 public void DeleteAllWords()
 {
     _wordCounterService.DeleteAllCountedWords();
 }