AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

CSLA TEMPLATES - Insert base class between the CSLA base classes and generated types #615

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A suggestion for a possible improvement to the templates.

Rocky suggests in the link below having a base class seperating the CSLA base 
classes and our own types.

http://forums.lhotka.net/forums/t/8907.aspx

It would be great(?) if the csla templates were to take this approach.  Just as 
you add ADOHelper to the solution you could add an empty base class for each of 
the csla stereotypes.  The generated classes would then use these new base 
classes.

An example of use.. 

On my current project I am using Windows Forms.  I need to use 
BusinessBindingListBase rather than over BusinessListBase (info on this can be 
found at http://forums.lhotka.net/forums/t/9008.aspx).

I have modified the templates accordingly but I hate doing this and would like 
to get back to the standard templates.

If I had a MyBusinessListBase base class I could specify whether it is derived 
from BusinessBindingListBase or BusinessListBase

The base class would also be useful for introducing common behaviours across 
all objects.

Original issue reported on code.google.com by ianmcdid...@gmail.com on 30 Nov 2011 at 9:49

GoogleCodeExporter commented 9 years ago
Sorry, you can ignore this.  I just realised that I can create these base 
classes myself.  If I create them in the same namespace as my generated classes 
I don't need to change anything in the templates.

Original comment by ianmcdid...@gmail.com on 1 Dec 2011 at 12:55

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 6 Dec 2011 at 10:50