public async Task <IHttpActionResult> GetSuppliersByCategoryAsync(int id) { CategoriesDTM category = await categoriesService.GetByIdAsync(id); if (category == null) { return(NotFound()); } IEnumerable <SuppliersDTM> suppliers = await service.GetByCategoryAsync(id); if (suppliers == null) { return(NotFound()); } return(Ok(suppliers)); }