What's the best way to load up data read in from sql server to a generic colleciton variable?
Posted on 2014-11-09
Should I use the SqlDataReader in a while loop to read each record into a generic colleciton var using the Add method? assigning each column to a property in a object or is there a better way to do this?
After I load up the data into the generic collection variable, how do I find the object that let's say the Id property = 5?