public async Task <ActionResult> Delete(int id, CancellationToken ct = default(CancellationToken)) { try { if (await _chinookSupervisor.GetInvoiceLineByIdAsync(id, ct) == null) { return(NotFound()); } if (await _chinookSupervisor.DeleteInvoiceLineAsync(id, ct)) { return(Ok()); } return(StatusCode(500)); } catch (Exception ex) { return(StatusCode(500, ex)); } }