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