Business Objects / Custom DAL Design Classes

I need some advice on how to handle this scenario. My application has many tables and custom classes associated with these tables. The following (pseudocode) can be used as an example:

Public Class Country
Name As String
Language As String
Capital As String
President As String

Public Class State
Name As String
Capital As String
Country As String

Public Class City
Name As String
State As String
Country As String

      

Retrieving a single object of any of these classes is straight forward. Getting lists of any of these objects is straightforward too.

Where do I need a guide on how to get a combination of these objects. For example, we might want to display a list of city names and country presidents (excluding the state class). What object should I use to store this data? I want to avoid getting status data because trips to the database are expensive. I usually represent information using repeaters, so I also need an object that easily binds to the repeater.

Thanks for your help.

+2


a source to share





All Articles