public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
{
var users = new MembershipUserCollection();
using (var conn = this.CreateConnection())
{
if (conn.HasConnection)
{
using (var cmd = conn.CreateTextCommand(string.Format("SELECT username, EmailAddress, lastLoginTime FROM {0}Users WHERE BlogID = {1}blogid ", this.tablePrefix, this.parmPrefix)))
{
cmd.Parameters.Add(conn.CreateParameter(FormatParamName("blogid"), Blog.CurrentInstance.Id.ToString()));
using (var rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
users.Add(this.GetMembershipUser(rdr.GetString(0), rdr.GetString(1), rdr.GetDateTime(2)));
}
}
}
}
}
totalRecords = users.Count;
return users;
}