public IActionResult GetAllInvoicesWithSalesAgentName() { var invoices = _repository.GetInvoiceTotalsWithAgentName(); var isEmpty = !invoices.Any(); if (isEmpty) { return(NotFound("No invoices found")); } return(Ok(invoices)); }