public override List<AuthorProfile> FillProfiles()
{
var profileNames = new List<string>();
using (var conn = this.CreateConnection())
{
if (conn.HasConnection)
{
using (var cmd = conn.CreateTextCommand(string.Format("SELECT UserName FROM {0}Profiles WHERE BlogID = {1}blogid GROUP BY UserName", this.tablePrefix, this.parmPrefix)))
{
cmd.Parameters.Add(conn.CreateParameter(FormatParamName("blogid"), Blog.CurrentInstance.Id.ToString()));
using (var rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
profileNames.Add(rdr.GetString(0));
}
}
}
}
}
return profileNames.Select(BusinessBase<AuthorProfile, string>.Load).ToList();
}