I have worked on retrieving the data from SQL database using Datareader and populate it in Datatable.. But, I am wondering whether is there any way to handle the data from datareader without using datatable ? I mean- handling the table values using Objects should be more preferable..
But, I dont want to use LINQ here since, I am going to use ADOMD object to pull the data from database(Cubes)..
public List GetEmployee(string spname) {
Just loop thrugh the items and set it as the property values of your custom class. The below example read data from Customer table and Create a List of Customer Class object. Assuming you have a Customer POCO with ID and Name as Properties
Have a look at dapper-dot-net. I'm not sure how it works with ADOMD.NET, but it does neatly materialise query results in dynamic objects.