Generate UML diagram from C# class

冷暖自知 提交于 2019-12-01 05:16:33

问题


I have nHibernate-generated classes functioning as the BO for an MVC project persisting to a SQL db. I'd like to render the existing code into UML diagrams so I can start playing around with code gen utilities.

Similar to what's asked here only for SQL/nhibernate - SO suggests Tools for generating UML class diagram from C# source or dll and that's really very close - except the last answer there is all of 2 years old. Surely the body of knowledge has expanded since.


回答1:


No tool is required:

  • Right-click your project name, then select View Class Diagram, which will automatically generate a list of all your classes.
  • After that, I'd delete any classes that you don't care about, and expand the ones you do care about.

I'm assuming you're using Visual Studio 2010.



来源:https://stackoverflow.com/questions/7775454/generate-uml-diagram-from-c-sharp-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!