public async Task <IActionResult> GetDataAsync([FromForm] DataParameters parameters) { Guard.ThrownExceptionIfNull(parameters, nameof(parameters)); var items = await _postService.GetForDataTable(parameters); var dataTable = DataTableHelper.BuildDataTable(items.Data, items.RecordsTotal, items.RecordsFiltered, parameters.Draw, parameters.Start, parameters.Length); return(Ok(dataTable)); }
public IActionResult GetPeopleData(DataParameters parameters) { var items = personService.GetPeopleForDataTable(parameters); var dataTable = DataTableHelper.BuildDataTable(items.Data, items.Count); dataTable.Draw = parameters.Draw; return(Ok(dataTable)); }