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