Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }