none
How to cast SQLData Reader to a list RRS feed

  • Question

  •  

    I'm using SQL COmmand's execute reader and wan't to case to a list. Is that possible ?

    Any suggestions.....

    Saturday, November 3, 2007 12:04 AM

Answers

All replies

  • You can read data into a list.

     

    Saturday, November 3, 2007 2:21 AM
  • That is some extra work and I have to change lot of code around it. I was using NHibernate before and I made things work the Hibernate way...

     

    IList images = nHibernateSession.CreateQuery("FROM Image WHERE ProductID='" + product.EntityID + "'").List();

     

    and the above did everything but using DataReader its kind of heard to get the same functionality. Is there any other SQL class I can use providing me same functionality.

    Saturday, November 3, 2007 6:09 AM