Returning Types Question

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have an admin class that has add/update/delete/getAll functionallity for
customers.
My add/update/delete's will return bool's for success/failure which is fine.

My getAll method will need to return all rows of customers, which in turn
will be bound to a datagrid/repeater.

My question is what is the best way to return the list of customers?
ArrayList of Customer Objects, Datasets?

Thanks for your opinions
Chris
 
Hi, Chris,

You can make overloads of the method GetAll - one to return DataSet (or
DataTable or DataView etc.) for the presentation layer and another to return
collection for the business layer. I use strong typed collections instread
of boxing the objects into an ArrayList, but it's really a question of
personal preferences.

Hope this helps
Martin
 
Back
Top