A191919
A191919

Reputation: 3442

Relations between uml diagrams

I have something like this

public class Item
{
   public string FirstName { get; set; }
   public string LastName { get; set; }
   public int ID { get; set; }
}

public class Data
{
    public List<Item> Items { get; set; }
}

enter image description here

what is right type of relationsheeps between them? Dependency?

Upvotes: 1

Views: 75

Answers (2)

Jim L.
Jim L.

Reputation: 6529

I don't know what your model means, but here is a version of it in normal UML 2:

enter image description here

If I were you, I would put a property on both ends of the association and give each one a semantically strong name. For example, describedItems and describingData. Please see how to indicate a list of types in UML and this answer on association ends.

Upvotes: 0

Binkan Salaryman
Binkan Salaryman

Reputation: 3048

You are right - Data is dependent on Item, since it "owns" many Items. This is a form of aggregation.

This is the arrow you are searching for:

         0..*     0..*
| Data | <>―――――――> | Item |

enter image description here

Upvotes: 2

Related Questions