public Level GetLevelWords(int levelId) { IEnumerable <GameLevelWord> gameLevelWords = gameLevelWordRepository.GetWhere(l => l.GameLevelId.Equals(levelId)); IEnumerable <int> ids = gameLevelWords.Select(gl => gl.WordPairId); return(new Level { LevelId = levelId, WordTranslations = wordsService.GetWordsById(ids) }); }