Ejemplo n.º 1
0
 private IEnumerable <MatchViewModel> GetSpectateMatches(string userId, int index)
 {
     return(MatchQuery()
            .Where(x => x.Status != Status.Open && x.Status != Status.Pending)
            .OrderByDate()
            .GrabSegment(index)
            .ToList()
            .Select(x => MatchViewModel.GetMatch(x, userId)));
 }
Ejemplo n.º 2
0
 private IEnumerable <MatchViewModel> GetActiveMatches(string userId, string displayName)
 {
     return(MatchQueryByStatus(Status.Active)
            .Where(x => x.MatchUsers.Select(y => y.UserId).Contains(userId))
            .FilterByUser(displayName)
            .OrderByDate()
            .ToList()
            .Select(x => MatchViewModel.GetMatch(x, userId)));
 }