C# MVC UML 类图
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14011271/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MVC UML class diagram
提问by Danny De Boiserie
I've have to work on a new project,written in C# mvc,the first thing i would like to do is create an UML class diagram. Is there somewhere an example of how to do this? Most examples show one controller with one view and one model. But in this project there is per controller multiple Views and multiple ModelDto's Thanks.
我必须在一个用 C# mvc 编写的新项目上工作,我想做的第一件事是创建一个 UML 类图。有没有一个例子说明如何做到这一点?大多数示例显示一个控制器,一个视图和一个模型。但是在这个项目中,每个控制器有多个视图和多个 ModelDto,谢谢。
采纳答案by Sampath
You can do like below by using MS visio or any other UML tool.
您可以使用 MS visio 或任何其他 UML 工具执行以下操作。
Just a sample looks like below(methods and properties should differ)
只是一个示例如下所示(方法和属性应该不同)
Like above you can extend the above diagram for more views and models per controller.
像上面一样,您可以扩展上图以获得每个控制器的更多视图和模型。
i.e.In MVC you can have many Action methods inside a Controller and relevant view and model per Action method (in general).
即在 MVC 中,您可以在 Controller 中拥有许多 Action 方法以及每个 Action 方法(通常)的相关视图和模型。
For more details check Model View Controller Design Patterns
有关更多详细信息,请查看模型视图控制器设计模式
I hope this will help to you.
我希望这会对你有所帮助。