Filling object from a datareader
I was asked a question in Interview. How will you fill your custom objects with data returned from a datareader.

My answer was using datareader.read(), creating instance of the custom object and setting properties with datareader values.

The interviewer was not pleased. He said if i have millions of records, then it will be very slow to fill these records using my approach. He asked me to suggest alternative way.

Is there any other way except this. Please comment.
Filling object from a datareader
===

I was asked a question in Interview. How will you fill your custom objects with data returned from a datareader.

My answer was using datareader.read(), creating instance of the custom object and setting properties with datareader values.

The interviewer was not pleased. He said if i have millions of records, then it will be very slow to fill these records using my approach. He asked me to suggest alternative way.

Is there any other way except this. Please comment.