Hi
I'm currently evaluating LLBLGen, but I have a question about how best to transfer entities/collections between tiers.
Currently all our apps use typed datasets as "data transfer objects", to pass data through the tiers. It has the advantage that the business tier can populate a number of tables in this dataset and send it all up to the UI in one go. For example, if I had a customer/order data entry page, the business tier might populate the dataset with the customer row, all their order rows, plus any lookup/reference data needed by the UI (e.g. country names, Mr/Mrs/titles, order status codes, and so on - for use in dropdown lists).
If I was to move over to LLBLGen, how could I accomplish a similar "data transfer" of many entities/collections at once? I would be using the "adapter" model.
Obviously the customer/orders is straightforward, and would be populated using code similar to this:
DataAccessAdapter adapter = new DataAccessAdapter(true);
OrderEntity order = new OrderEntity(10254);
adapter.FetchEntity(order);
order.Customer = (CustomerEntity)adapter.FetchNewEntity(new CustomerEntityFactory(), order.GetRelationInfoCustomer());
adapter.CloseConnection();
The customer can then be transferred up through the tiers, taking the related orders with it. But what can I do about all the other lookup/reference data tables that I might want to send with it? Can anyone suggest a way to transfer all this in one go, or will it be an architecture change (e.g. repeated calls to the business tier to retrieve the lookup data)?
Thanks in advance
Andy