예제 #1
0
        public async Task <IActionResult> GetProductById([FromRoute] string id)
        {
            var product = manager.GetProductById(id);

            return(Ok(product));
        }
예제 #2
0
        public IActionResult GetProduct(int id)
        {
            var product = _productsManager.GetProductById(id);

            return(product != null ? (IActionResult)Ok(product) : NotFound());
        }