Ejemplo n.º 1
0
        public async Task <IHttpActionResult> GetCocktail(int id)
        {
            IConstituentService constituentService = new ConstituentService(_db);
            var constituent = await constituentService.GetConstituentAsync(id);

            if (constituent == null)
            {
                return(NotFound());
            }

            return(Ok(constituent));
        }
Ejemplo n.º 2
0
        public IQueryable <Constituent> GetConstituents()
        {
            IConstituentService constituentService = new ConstituentService(_db);

            return(constituentService.GetConstituents());
        }
Ejemplo n.º 3
0
        public IEnumerable <Cocktail> GetCocktailByConstituent(int constituentId)
        {
            IConstituentService cocktailService = new ConstituentService(_db);

            return(cocktailService.GetCocktailsByConstituentId(constituentId));
        }