Beispiel #1
0
        private async Task ExecuteVenuesPendingVerifyQuery()
        {
            var results = (await venues.FetchCountedPendingVerifyVenues(PageNumber, 20).ConfigureAwait(false))
                          .Ensure(e => e.HasValue, "Venues found")
                          .OnSuccess(e => e.Value)
                          .OnBoth(e => e.IsSuccess ? e.Value : new PaginatedResult <Venue> {
                Data = new List <Venue>(), Count = 0
            });

            TotalResults = results.Count;
            Results      = results.Data.Select(v => new QueryResult {
                Title = v.VenueName,
                Href  = $"/venue/{v.VenueId}"
            }).ToList();
            Title       = $"Pending venues ({TotalResults})";
            HasNextPage = (PageNumber + 1) <= (TotalResults / 20);
        }