public async Task <IActionResult> GetAllCommoditiesByCompanyId(int companyId) { try { var _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); Commodity[] results = await _serviceEndPoint.GetAllCommoditiesByCompanyId(companyId); if (!results.Any()) { return(NotFound(results)); } return(Ok(results)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }