public List <DimensionEntity> GetItemList(string dimension_name, int?statue, Pagination pagination) { if (pagination.rows == 0 || pagination == null) { //分页rows=0 获取全部 return(GetDimendionByStatue(statue)); } var expression = ExtLinq.True <DimensionEntity>(); if (!string.IsNullOrEmpty(dimension_name)) { expression = expression.And(r => r.dimension_name.Contains(dimension_name)); } if (statue != null) { expression = expression.And(r => r.statue == statue); } return(service.FindList(expression, pagination)); }