//[Route("GetProduct")]
        public async Task <ActionResult <Product> > GetProduct(int id)
        {
            var product = await _productsRepository.Get(id);

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

            return(Ok(product));
        }
예제 #2
0
        //[Route("GetSale")]
        public ActionResult <Sale> GetSale(int id)
        {
            var Sale = _SaleRepository.Get(id);

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

            return(Ok(Sale));
        }