public async Task <IEnumerable <PlayedGames> > GetPlayedGames(string userId) { var userGuid = Guid.Parse(userId); var playedGameRepository = new PlayedGameRepository(); return(await playedGameRepository.GetAllWhere(m => m.UserInfoId == userGuid)); }
public async Task <PlayedGames> GetBestGame(string userId) { var userGuid = Guid.Parse(userId); var playedGameRepository = new PlayedGameRepository(); return((await playedGameRepository.GetAllWhere(m => m.UserInfoId == userGuid)) .OrderBy(m => m.Score) .First()); }