Created
April 7, 2018 20:26
-
-
Save Daniel-sims/e84fce88674c8946455efd93ac2387dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IEnumerable<Models.DbMatch.Match> GetMatchesForListOfTeamIds(long usersChampionId, IEnumerable<int> teamOne, IEnumerable<int> teamTwo, int matchCount) | |
{ | |
Console.WriteLine(DateTime.Now + " finding metches of users request."); | |
return _dbContext.Matches | |
.Include(x => x.Teams).ThenInclude(y => y.Players).ThenInclude(x => x.Runes) | |
.Include(x => x.Teams).ThenInclude(y => y.Players).ThenInclude(x => x.Items) | |
.Include(x => x.Teams).ThenInclude(y => y.Players).ThenInclude(x => x.SummonerSpells) | |
.Include(x => x.Teams).ThenInclude(y => y.Players).ThenInclude(x => x.Events) | |
.Where(q => q.Teams | |
.All(t => | |
teamOne.All(f => t.Players.Select(p => p.ChampionId).Contains(f)) || | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment