public static HashSet <Beer> GetBeersContainingTags(List <Tag> tags) { BeerRepository br = new BeerRepository(); var beers = br.RetrieveAll(); HashSet <Beer> foundBeers = new HashSet <Beer>(); foreach (var tag in tags) { foundBeers.UnionWith(br.RetrieveBeersByTag(tag)); } return(foundBeers); }
public static List <Beer> GetAllBeers() { var repository = new BeerRepository(); return(repository.RetrieveAll()); }