public IActionResult GetDataTable([FromQuery] jQueryDataTableParamModel param) { ContainerDTO <ProductDTO> productContainerDto = productServiceClient.findAllPagedAsync(param.start, param.length).GetAwaiter().GetResult(); List <ProductModel> data = productContainerDto.list.Select(productDto => MVCModelToDTOUtil.ToProductModelMap(productDto)).ToList(); jQueryDataTableData <ProductModel> dataTableResponse = new jQueryDataTableData <ProductModel>(param.draw, productContainerDto.total, data); return(Ok(dataTableResponse)); }
public JsonResult GetDataTable(jQueryDataTableParamModel param) { ContainerDTO <ProductDTO> productContainerDto = productServiceClient.findAllPaged(param.start, param.length); List <ProductModel> data = productContainerDto.list.Select(productDto => MVCModelToDTOUtil.ToProductModelMap(productDto)).ToList(); jQueryDataTableData <ProductModel> dataTableResponse = new jQueryDataTableData <ProductModel>(param.draw, productContainerDto.total, data); return(Json(dataTableResponse, JsonRequestBehavior.AllowGet)); }