Ejemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <Product> > > GetProducts(string code = null)
        {
            Product value = await productQueries.GetProductAsync(code);

            if (value == null)
            {
                return(new NotFoundResult());
            }
            return(base.Ok(value));
        }
 public async Task <Product> GetProduct(string code)
 {
     return(await productQueries.GetProductAsync(code));
 }