codesmithtools / Templates

CodeSmith Generator Templates
http://www.codesmithtools.com/product/generator
54 stars 35 forks source link

PLINQO: Add possibility of specifying a base interface for entities #595

Closed GoogleCodeExporter closed 4 years ago

GoogleCodeExporter commented 9 years ago
We want all our entities to contain some specific columns (CreatedBy, 
CreatedDate, etc). To ensure all tables being created with these columns, we 
have created an interface containing them (IEntityBase)

It would be nice if we could specify a base interface for entities, in stead of 
having to patch Entity.Generated.cst.

What version of the product are you using?
Trunk

Please provide any additional information below.

Original issue reported on code.google.com by dasj...@gmail.com on 21 Jul 2011 at 9:05

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for this feature suggestion. We will consider adding this support in a 
future release. Have you thought about using Linq's inheritance support to have 
a base class with these three properties? This would be defined in the dbml and 
generated by us.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 25 Jul 2011 at 6:42

GoogleCodeExporter commented 9 years ago
If we were to use LINQ's inheritance support, wouldn't we have to specify it 
manually in the DBML for every table? If that's the case, it wouldn't solve our 
problem, because it wouldn't prevent anyone from forgetting to do that. We also 
have so many tables that we like to automate as much as possible. That's why we 
use PLINQO...:-)

Original comment by dasj...@gmail.com on 25 Jul 2011 at 7:43

GoogleCodeExporter commented 9 years ago
Hello,

Yes, you are correct that you would need to specify this in the DBML for every 
type. 

Would you mind submitting your patch for Entity.Generated.cst and any other 
templates regarding this issue?

Original comment by bniemyjski on 26 Jul 2011 at 10:18