コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }