Click here to Skip to main content
15,898,035 members
Articles / Web Development / ASP.NET

Generically Populate List of Objects from SqlDataReader

Rate me:
Please Sign up or sign in to vote.
4.89/5 (30 votes)
10 Oct 2014CPOL7 min read 153.1K   2.9K   35  
This article will show how to create a list of a particular class type from a SqlDataReader object by dynamically creating a lambda expression to carry out the process of populating the list.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I am a Sr. Software Developer with over 20 years experience. I started programming in C++, moved to VB4 (while it was in Beta), and have eventually found myself programming in C#. I have experience creating and designing both Windows and Web applications, as well as Web Services and databases.

Comments and Discussions