Reputation: 3442
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; }
}
what is right type of relationsheeps between them? Dependency?
Upvotes: 1
Views: 75
Reputation: 6529
I don't know what your model means, but here is a version of it in normal UML 2:
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
Reputation: 3048
You are right - Data
is dependent on Item
, since it "owns" many Item
s. This is a form of aggregation.
This is the arrow you are searching for:
0..* 0..*
| Data | <>―――――――> | Item |
Upvotes: 2