Hi Vince,
You talked in one of your previous threads that you use to use the classic datareader approach before switching to linq to sql.
I was wondering if you could help explain to me using the classic datareader or datatable approach, but using the new Generic class. Here's what I would like to do, using your methods, if possible.
Currently you have an ENTBaseData class that uses Generic collection, which I like.
vb =
Code:
PublicMustInheritClass ENTBaseData(Of T)
Now, I can create a class (AddressTable) that will look like my results set, some properties.
Create another class(e.g. AddressData) that inherits ENTBaseData(Of AddressTable)
Now can datareader use ToList method or can datatable use the ToList method. Or, can you tell me how to get a class that can use the ToList method so I can keep my ENTBaseData class generic.
For example, AddressData class would have a method called SelectAll, in here I would need a connection and return a datareader or datatable and call the ToList to populate my list of AddressTable. How can I do this, if possible?
I have done this before but not using the Generic collection, but rather creating my own collection and added a new item class to the collection over the iteration.
Thanks,
realkewl