public async Task <IActionResult> GetProductById([FromRoute] string id) { var product = manager.GetProductById(id); return(Ok(product)); }
public IActionResult GetProduct(int id) { var product = _productsManager.GetProductById(id); return(product != null ? (IActionResult)Ok(product) : NotFound()); }