public static List <UserInfo> GetInfos(string strContent, int page, int count) { StringBuilder strWhere = new StringBuilder(); object param = null; if (!string.IsNullOrEmpty(strContent)) { strWhere.Append(" and UserName like @UserName "); param = new { UserName = $"%{strContent}%" }; } strWhere.Append($" order by Id desc limit {count} offset {page * count} "); UserInfos = Dal_UserInfo.GetInfos(strWhere.ToString(), param); return(UserInfos); }
public static List <UserInfo> GetInfos() { List <UserInfo> infos = Dal_UserInfo.GetInfos(string.Empty, null); return(infos); }