public override List<Identity> GetAll(NorthwindConfig config, string whereExpression, OleDbParameter[] oleDbParameters)
{
List<Identity> result = new List<Identity>();
int recordCount = 0;
Emails emailsDataset = new Emails();
// get the first 11 rows of the changelog
using (OleDbConnection connection = new OleDbConnection(config.ConnectionString))
{
CustomerEmailsTableAdapter tableAdapter;
tableAdapter = new CustomerEmailsTableAdapter();
tableAdapter.Connection = connection;
if (string.IsNullOrEmpty(whereExpression))
recordCount = tableAdapter.Fill(emailsDataset.CustomerEmails);
else
recordCount = tableAdapter.FillByWhereClause(emailsDataset.CustomerEmails, whereExpression, oleDbParameters);
}
foreach (Emails.CustomerEmailsRow row in emailsDataset.CustomerEmails.Rows)
{
// use where expression !!
result.Add(new Identity(this.EntityName, row.ID.ToString()));
}
return result;
}