Generate UML diagram from C# class

2019-02-18 02:17发布

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条回答
够拽才男人
2楼-- · 2019-02-18 02:48

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.

Where to select view class diagram

查看更多
登录 后发表回答