예제 #1
0
 public IEnumerable<RatedBottleDTO> UnratedBottles(string searchTerm, string sortOption)
 {
     var dto = new BottleSearchDTO { SearchTerm = searchTerm, SortOption = sortOption };
     return new SearchBottle(new GetUnratedBottles().Run(), dto.SearchTerm).Run().OrderByDescending(dto.SortDefinition).Select(x => RatedBottleDTO.From(x, 0));
 }
예제 #2
0
 public IEnumerable<RatedBottleDTO> UnplacedBottles(string searchTerm, string sortOption)
 {
     var dto = new BottleSearchDTO { SearchTerm = searchTerm, SortOption = sortOption };
     return new SearchBottle(CellarRepository.Instance.Storage, dto.SearchTerm).Run().OrderByDescending(dto.SortDefinition).Select(x => RatedBottleDTO.From(x, new GetRating(x).Run()));
 }