I had this same choice .... a few months back.
On one screen, where I have 3 items to do a Sort (lets say I have 3
comboboxes where each box has 3 items... LastName , FirstName, BirthDate )
and I want to give the user the option of selecting the order they want...
by making choices.
I used a dataset here, because I could use the DataSet.Table.Select("")
method .. and then rebind to the ObjectDataSource.
However, I only switched out to the DataSet because of this one tricky
little item. I preferred to have used a CollectionBase... populated by a
IDataReader.
If you only need simple sorting .. (like clicking the header of the
GridView) then you probably can by pass the DataSet.
...
One other consideration.. if you have related data., lets say you have 1000
emps and 10 depts they work in. Sometimes I pick the dataset over the
custom collection...since I can "reuse" the single list of depts (aka, I
don't have to assign each Employee object ... a property/collection of 10
depts ... thus keep a record of 1000x10 depts).
Ok.. that's probably not the clearest post I've ever made, but hopefully
there is something in there.
I usually pick custom collection....custom business objects... over
DataSets, unless I have a specific reason not to.
PS
I am not crossposting this to
microsoft.public.dotnet.framework.adonet
I am only posting it to .aspnet
"Chris Fulstow" <ch**********@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hi all,
I'm investigating the best approach for building an n-tier web
application with ASP.NET 2.0. I want to separate my data access layer,
so an ObjectDataSource seems the natural choice, but I can't decide
whether to supply it data from a custom business object, or a DataSet
created with the DataSet designer.
Any thoughts?
Chris