Many of the examples of creating a DAL with custom entities (aka business entities, domain objects, business objects, entity objects) show the contrived case where you only need to deal with a single entity at a time. However, I'm trying to understand the situation where you need data from multiple tables (assuming a database as the data store).
For example, take the case of a one-to-many scenario such as customers and their orders. Say I want to display in a gridview a list of orders which has the customer name and the total order amount. Thus the gridview needs to display some data from the customer and some from the order. I have a custom entity for customers and one for orders. How do I combine this information? Do I cheat and also store the customer name in the order custom entity and then I can just bind the gridview to a list of orders? Also, I'd prefer to do the joining of information on the database side. H ...
Go to the complete details ...