public JsonResult List(int page) { var list = custService.PageList(page); var totalCount = custService.TotalCount(); var response = new JsonResult( new SingleResponse { Data = list.Select(x => new VBasicData { id = x.Id, code = x.Code, name = x.Code + x.NameCn }).ToList(), TotalCount = totalCount } ); return(response); }
public JsonResult List(int page) { var list = custService.PageList(page); var totalCount = custService.TotalCount(); var response = new JsonResult( new SingleResponse { Data = list, TotalCount = totalCount } ); return(response); }