public async Task <IActionResult> DataTable(DataTableRequest request, CancellationToken token) { var result = await _sampleTable.GetAsync(request, token); if (!string.IsNullOrWhiteSpace(result.Error)) { return(BadRequest(result)); } return(Ok(result)); }
public async Task <DataTable <T> .Table> Render <T>(IDataTable <T> dataTable, DataTableRequest request, CancellationToken token) where T : class { var data = await dataTable.GetAsync(request, token).ConfigureAwait(false); return(Render(dataTable, data)); }