/// <summary> /// Read through the reader and return a data object list /// </summary> private MailMessageList GetList(IDataReader reader) { MailMessageList list = new MailMessageList(); while (reader.Read()) { list.Add(GetDataObjectFromReader(reader)); } reader.Close(); return(list); }
/// <summary> /// Returns an ordered and filtered list of MailMessage rows. /// </summary> /// <param name="filter">Filtering criteria.</param> /// <param name="orderByClause">Ordering criteria.</param> /// <returns>List of MailMessage objects.</returns> /// <exception cref="Spring2.Core.DAO.FinderException">Thrown when no rows are found matching the where criteria.</exception> public MailMessageList GetList(SqlFilter filter, IOrderBy orderByClause) { IDataReader dataReader = GetListReader(CONNECTION_STRING_KEY, VIEW, filter, orderByClause); MailMessageList list = new MailMessageList(); while (dataReader.Read()) { list.Add(GetDataObjectFromReader(dataReader)); } dataReader.Close(); return(list); }