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")); } }
public void DeleteAllWords() { _wordCounterService.DeleteAllCountedWords(); }