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