Beispiel #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);
        }