public ActionResult AddWord(String word, String lang) { ActionResult result = null; dbAdapter = new Translator(); try { dbAdapter.AddWord(word, lang); result = Content(succesAddWordMessage); } catch (UndefineLangException e) { //result = new HttpStatusCodeResult(500, failAddWordMessage); result = Content(failAddWordMessage); } return result; }
public ActionResult Recognize(String word) { dbAdapter = new Translator(); dbAdapter.CalculatePercentReliability(word); return PartialView("PersentTablePartial", dbAdapter); }