Qué Padre
Qué Padre

Reputation: 2083

What is the fastest and the most convenient way to map SqlDataReader rows to C# classes?

I am wondering what you consider as the best way to map SqlDataReader rows to corresponding C# classes. SQL-queries are generated dynamically.

Upvotes: 0

Views: 118

Answers (1)

suff trek
suff trek

Reputation: 39777

SqlDataReader is not persistant, it's a firehose, designed for forward-only, read-only access to data. If you want to map SQL queries to classes you may need another approach like strongly typed datasets, LINQ2SQL etc.

Upvotes: 1

Related Questions