예제 #1
0
        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);
        }
예제 #2
0
        public static List <Beer> GetAllBeers()
        {
            var repository = new BeerRepository();

            return(repository.RetrieveAll());
        }