JimFoye wrote:
Also, I'm using Adapter because I'm doing a BLL with a manager class, and I assume that when I do this I should use adapter because I don't want the GUI calling .Save() on my entities, right?
Correct.
JimFoye wrote:
Otis wrote:
You could try the derived entity templates for adapter, available in the 3rd party section, These generate typed collections
Ok, I will look into this. Even if the Adapter must work with a generic collection, I would like to cast it to a typed collection before I pass to the GUI. But...tell me why the adapter can't work with typed collections? I'm sure it's something obvious.
Because it was a huge burden when you extended the entity classes through inheritance. The main problem was that if you had customer.Orders, it contains 'OrderEntity' entities. But if you extend OrderEntity to MyOrderEntity, the typed collection also has to be updated and this is a true pain. (causes lots of code changes). Furthermore some clients wanted a more smaller codebase when generating code, without the typed collections they didn't use.