Rewriting XAFGenerator.cs to use DXCore

Jan 3, 2012 at 12:40 AM

Hi Patrick (and any other contributors),

I have been looking at your tool and it has GREAT potential.

Trying to determine how to have my own custom base class I decided to have a look at the source.

Looking at the generator code it is very hard coded to particular requirements (such as C#).

After doing a bit of research I did find this

Basically we could look at refactoring the code to use DXCore's language parser to generate the class, this would not only allow for stronger typed, cleaner code it would also make it language agnostic (supporting VB as well).

This refactoring could also allow for a more "configurable" setup to allow for XAF detection versus XPO and remove some properties from teh generation if the ExpressApp reference isn't found.

I would probably also look at making a few more properties like on the Model having a DefaultBaseClassName, this could allow for users would want to have a custom base class, also on top of that an additional BaseClass property on the Entity itself. For example if you want to have a class inherit from the BaseImpl.Event or BaseImpl.FileAttachment classes, you currently can't (from what I can see).

Would love to get some dialog on this and get your thoughts.