public async Task <IActionResult> GetCatalog([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var catalog = await service.FindCatalogItemByAsync(id); if (catalog == null) { return(NotFound()); } return(Ok(catalog)); }