Casting PgSqlDataReader to List<T>
Posted: Fri 27 Oct 2017 01:53
I am planning to migrate a web forms project to MVC. In web forms I usually save the result of a SELECT statement in a PgSqlDataReader. What I want is to "cast" PgSqlDataReader to List<T>. One way to do it is to iterate the reader and add items to the list. Is there a "direct" way to perform such a casting?