public List <SysUser> GetList(Pagination pagination, string keyword) { var expression = base.GetFilterEnabled(); if (!string.IsNullOrEmpty(keyword)) { expression = expression.And(t => t.Account.Contains(keyword)); expression = expression.Or(t => t.RealName.Contains(keyword)); expression = expression.Or(t => t.MobilePhone.Contains(keyword)); } return(_SysUserRespository.GetPagList(expression, pagination)); }
public List <SysUser> GetList(Pagination pagination, string keyword) { var expression = ExtLinq.True <SysUser>(); if (!string.IsNullOrEmpty(keyword)) { expression = expression.And(t => t.Account.Contains(keyword)); expression = expression.Or(t => t.RealName.Contains(keyword)); expression = expression.Or(t => t.MobilePhone.Contains(keyword)); } expression = expression.And(t => t.Account != "admin"); return(_SysUserRespository.GetPagList(expression, pagination)); }