Thanks all for the help
Hi All,
public static List<Order> LoadAll()
{
// Load all orders in the table. If too
// many records, consider exposing this
// operation as a plain ADO.NET function.
}
What would the “plain ADO.NET function” look like if there were too many records?
Thanks,
rod.
P.S.
The name of the book is:
Microsoft® .NET: Architecting
Applications for the Enterprise
He probably means streaming the data from the database via a
DbDataReaderobject rather than loading all of the records into an in-memoryList<T>. You could implement that as anIEnumerable<T>and yield return objects based upon the current data record.