L
Leon Mayne
We have static functions in our data access layer that return generic lists
of our business objects, such as this:
Public Shared Function AllUsers() as Generic.IList(of OurUserObject)
Dim colUsers as New Generic.List(of OurUserObject)
' Populate collection here
Return colUsers
End Function
These methods are used thoughout the code, but in some aspx files we would
like to have a drop down list which retrieves data from these methods (e.g.
to allow the user to pick a user from the database). I've so far been using
an ObjectDataSource control linked to the above method and a drop down list
bound to the ObjectDataSource. This works fine. However, our senior
developer has never used the built in 2005 data objects and does not like
them, and prefers to do manual binding in the Page_Load event.
Is it better in the above scenario to use to use an ObjectDataSource or to
do the binding yourself? Can anyone cite any articles that give reasons why
using the DataSource objects are a good or bad thing? Bear in mind this is
an enterprise application, so simplicity is not really an issue.
of our business objects, such as this:
Public Shared Function AllUsers() as Generic.IList(of OurUserObject)
Dim colUsers as New Generic.List(of OurUserObject)
' Populate collection here
Return colUsers
End Function
These methods are used thoughout the code, but in some aspx files we would
like to have a drop down list which retrieves data from these methods (e.g.
to allow the user to pick a user from the database). I've so far been using
an ObjectDataSource control linked to the above method and a drop down list
bound to the ObjectDataSource. This works fine. However, our senior
developer has never used the built in 2005 data objects and does not like
them, and prefers to do manual binding in the Page_Load event.
Is it better in the above scenario to use to use an ObjectDataSource or to
do the binding yourself? Can anyone cite any articles that give reasons why
using the DataSource objects are a good or bad thing? Bear in mind this is
an enterprise application, so simplicity is not really an issue.