First off: You can change them by modifying the templates. Why is it not easier? Because it is considered best-practice to hide the collection and place the logic in the entity object, i.e. rather than
totalSales = publisher.Titles.GetSumOfSales();
one should write
totalSales = publisher.GetTotalSales();
and put the logic into that method. (There's more on this in the Neo Best Practices presentation which can be found here: http://neo.codehaus.org/docs.html)
So, why are the collections public by default? Because it's a common pattern in the .NET frameworks and we like to play nice...
Labels:

1 Comment
Hide/Show CommentsMay 16, 2007
Ulu Honolulu
There are methods that depend solely on collections irrespective of their nature (i.e., be it the Titles of a publisher, or titles published within a certain period of time etc.). So, instead of writing a separate method each time I want to sum the sales, I could write it just once.
I guess even the best practices are not universal..