Visual Studio code creation - how to deal with developers by editing class files

So, thanks to the Visualization and Modeling Feature Pack , I can build an uml model diagram and create a bunch of classes.

But what now? My developers are supposed to add code to these classes. Useful code, valuable code, and, like the templates themselves, indicate:

//     Changes to this file will be lost if the code is regenerated.

So what's the best solution here? Can I make a simulation project reflect changes in real classes? Should I generate partial classes? Change default templates to read class files instead of automatically generating everything that has been changed? Should I tell developers not to edit model files under pain .... well, pain?

Thanks for the tips.

+3
source share
4 answers

You can also create classes derived from the generated ones and make any changes there. I also agree with the above statement that partial classes can be a way.

+2
source

As far as I know, this is actually a key reason for partial classes. User code is sent to one file, automatically generated in another.

+5
source

, . , . - XML SQL. yep, #, , . , . - " ": UML . . , . , , .

0

, , , , . , . , UML , # "Partial", , , . , , , False , , . , , , , . , , , , , , UML. , , . .

0
source

Source: https://habr.com/ru/post/1754282/


All Articles