public Tuple<string, string> GetNextWord(int translatedExpressionID)
 {
     TranslatedExpressionManager teManager = new TranslatedExpressionManager(db);
     TranslatedExpression trexpressionItem = teManager.GetItemForId(translatedExpressionID);
     string translatedText = trexpressionItem.TranslatedText;
     SourceDefinitionManager sdManager = new SourceDefinitionManager(db);
     SourceDefinition sdItem = sdManager.GetItemForId(trexpressionItem.SourceDefinitionID);
     SourceExpressionManager seManager = new SourceExpressionManager(db);
     SourceExpression seItem = seManager.GetItemForId(sdItem.SourceExpressionID);
     Tuple<string, string> pair = new Tuple<string, string>(seItem.Text, translatedText);
     return pair;
 }
 public async Task<TranslateRequestResult> Translate(string sourceString)
 {
     TranslateRequestResult RequestResult = new TranslateRequestResult(sourceString);
     SourceExpressionManager sourceManager = new SourceExpressionManager(db);
     List<SourceExpression> sourceList = sourceManager.GetSourceExpressionCollection(sourceString, direction).ToList();
     if (sourceList.Count > 0)
     {
         SourceDefinitionManager defManager = new SourceDefinitionManager(db);
         List<SourceDefinition> definitionsList = defManager.GetDefinitionCollection(sourceList[0].ID);
         TranslatedExpressionManager translatedManager = new TranslatedExpressionManager(db);
         var translatedList = translatedManager.GetListOfCoupleTranslatedExpressionAndFavorite(definitionsList);
         RequestResult.SetTranslateResult(createTranslateResult(sourceString, sourceList, definitionsList, translatedList));
     }
     return RequestResult;
 }