G
George
I am wondering what is the cost of using DataTable.
Lets say i have 1000 Employee records. The object oriented purist will require the Data Layer to return an ArrayList with 1000 Employee objects.
But very often we (at least i) returning DataTable to populate the grid.
But now i am wondering: Am i gaining anything?
The DataTable has to create object DataRow for each row. Versus i am creating Employee object for each row.
So unless DataTable does not create 1000 of objects I am actually loosing the benefits of using strong type and gaining nothing.
Am i correct?
Thanks.
George
Lets say i have 1000 Employee records. The object oriented purist will require the Data Layer to return an ArrayList with 1000 Employee objects.
But very often we (at least i) returning DataTable to populate the grid.
But now i am wondering: Am i gaining anything?
The DataTable has to create object DataRow for each row. Versus i am creating Employee object for each row.
So unless DataTable does not create 1000 of objects I am actually loosing the benefits of using strong type and gaining nothing.
Am i correct?
Thanks.
George