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