views:

192

answers:

2

Hello,

I use code-generation for my data access layer and Doxygen for documentation. My problem is that I can't add Xml comments on the generated classes since they will be overwritten as soon as I re-generate the code. To be more precise I can add Xml comments to my custom methods (which are in a separate file as partial classes) but I can't do it on data properties.

Any suggestions?

+2  A: 

With Doxygen, you don't have to write your documentation scattered throughout the file, so you can keep it separate from the generated code and prepend it to the generated file as a post-generation step.

Victor Nicollet
This might do the trick, I'll try it
Diadistis
A: 

Keep the documentation in your model, and have your CST templates pull out & write that information to the generated code.

For example, you can comment (is comment the right word? Maybe the field is called summary) tables and columns in your SQL database - i know of a few codegen solutions that automatically put that text into your code...

Rob Fonseca-Ensor