public async Task GetAllRankings() { RankingRepository repo; IEnumerable <Ranking> rankings; repo = new RankingRepository(); rankings = await repo.GetAllAsync(); Assert.IsTrue(rankings.Count() > 0); }
/// <summary> /// Override of <see cref="LoadAllAsync"/> to use <see cref="RankingRepository"/> instead for including navigation properties /// </summary> /// <returns></returns> protected override async Task LoadAllAsync() { // Create factory, and get the instance RepositoryFactory <RankingRepository, Ranking> rankingFactory = RepositoryFactory <RankingRepository, Ranking> .GetInstance(); // Create repository with the factory RankingRepository rankingRepository = rankingFactory.Create(); // Get all reservations IEnumerable <Ranking> rankings = await rankingRepository.GetAllAsync(); // Replace collection Items.ReplaceWith(rankings); }