public ActionResult Function() { TS_FUNCTIONDTO fcDto = new TS_FUNCTIONDTO(); //获取完成工差列表 PageResult <TS_FUNCTION> ef = basicsService.GetFunctions(fcDto); //获取分页数据 BASEPAGE page = AUTOMAPING.Mapping <BASEPAGE>(ef); this.HttpContext.Session["Page"] = page; //EF实体数据转换为DTO fcDto.Functions = MAPPING.ConvertEntityToDtoList <TS_FUNCTION, TS_FUNCTIONDTO>(ef.DataList); return(View(fcDto)); }