public HashSet<string> GetFilteredLRUs(DbConnection conn)
{
_log.Debug("Filtering requested LRUs");
HashSet<string> results = new HashSet<string>();
if (string.IsNullOrEmpty(this.SummaryLevel))
{
//self-heal if summary level wasn't provided
_log.Error("No Summary Level Selected -- defaulting to Block groups \"150\" -- ");
this.SummaryLevel = "150";
}
if (!string.IsNullOrEmpty(this.SummaryLevel))
{
string sql = string.Format("select LOGRECNO from {0} where SUMLEVEL = @sum", this.GetGeographyTablename());
using (var cmd = DbClient.GetCommand(sql, conn))
{
DbClient.AddParameter(cmd, "sum", this.SummaryLevel);
using (var reader = cmd.ExecuteReader())
{
while (reader.Read())
{
string lrn = reader.GetString(0);
results.Add(lrn);
}
}
}
}
return results;
}