public async Task <ActionResult <InvoiceApiModel> > GetByCustomerId(int id, CancellationToken ct = default) { try { if (await _BlazorSupervisor.GetCustomerByIdAsync(id, ct) == null) { return(NotFound()); } return(Ok(await _BlazorSupervisor.GetInvoiceByCustomerIdAsync(id, ct))); } catch (Exception ex) { return(StatusCode(500, ex)); } }