Using class diagrams to describe the domain model in Visual Studio

Source: Internet
Author: User

Right-click the solution and add a UML class diagram called "Domain Model".

First of all, stand in the overall angle to add the class, first don't have any attributes.

Add the customer's association to wishlist and set the is navigable in the Second Role item in properties to False.

Add Cusomter to Shopping cart and set "is navigable" in the "Second Role" item in "Properties" to false.

Add the customer's association to order and set "is navigable" in the "Second Role" item in "Properties" to false.

Add the shopping cart to the shipping cart items and set the is navigable in the Second Role item in properties to False.

Add the Order's association to order line item and set the is navigable in the Second Role item in properties to False.

Add wishlist to toy, and set "is navigable" in the "Second Role" item in properties to False.

Add shopping Cart items to toy, and set "is navigable" in the "Second Role" item in properties to False.

Add the order line item's association to toy and set the is navigable in the Second Role item in properties to False.

Modifying the relationship between customer and order is a 1-to-many relationship.

The relationship between modifying the shopping cart and the shopping cart items is 1 to 1 or more.

The relationship between the Change Order and the Orderline item is 1 to 1 or more.

What if a class is deprecated at a point in time?

You can add a background color to the deprecated class and add a comment, as follows:

The class is now materialized.

Create a UML class diagram called "Orders Model".

The relationship between "order" and "order line item" has been pulled out of the 2 classes in UML Model Explorer and is still preserved.

The attribute that enriches the order.

The Shipping Method property is used in order, which is an enumeration type. Add an enumeration called "Shipping Methods" on the interface.

Add the order to the shipping methods, and set "is navigable" in the "Second Role" item in properties to False, modified as follows:

Enrich the properties of the order line item.

Note:

The class name has a clear semantics, no spaces, no abbreviations.
Do not create redundant classes, create classes that the database needs to use
Strive for simple relationships between classes, not complex relationships
When adding attributes, specify the attribute type when necessary
Avoid adding key attributes, which are used at specific design time.

Reference: https://channel9.msdn.com/Blogs/clinted

Using class diagrams to describe the domain model in Visual Studio

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.