I have a data tier select method that returns a datatable. It's called from a business tier method that should then return a strongly typed generic List.
What I want to do is very similar (but not the same as) this question:
How do you convert a DataTable into a generic list?
What's different is that I want the list to contain strongly-typed objects rather than datarows (also, I don't have linq avaiable here yet).
I'm concerned about performance. The business tier method will in turn be called from the presentation tier, and the results will be iterated for display to the user. It seems very wasteful to add an extra iteration at the business tier, only do it again right away for the presentation, so I want this to be as quick as possible.
This is a common task, so I'm really looking for a good pattern that can be repeated over and over.
See Question&Answers more detail:os