public ActionResult CustFile() { TS_CUSTFILEDTO cfDto = new TS_CUSTFILEDTO(); //获取数据字典列表 PageResult <TS_CUSTFILE> ef = service.GetCustFiles(cfDto); //获取分页数据 BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef); this.HttpContext.Session["Page"] = page; //EF实体数据转换为DTO cfDto.CustFiles = MAPPING.ConvertEntityToDtoList <TS_CUSTFILE, TS_CUSTFILEDTO>(ef.DataList); return(View(cfDto)); }