c# - POCO objects to UML representation -
i want correctly represent poco classes of entity framework in uml diagram. instance, have following relationships :
public class schoolgroup { public int id {get;set;} public string groupname {get;set;} public subject groupsubject {get;set;} public teacher groupteacher {get;set;} public icollection<student> attendeestudents {get;set;} }
here see school group entity contains of instances of subject, teacher , collection of students.
according post difference between association, aggregation , composition :
association - have relationship object. foo uses bar.
composition - own object , responsible lifetime, when foo dies, bar.
aggregation - have object i've borrowed else. when foo dies, bar may live on.
so, how should represent schoolgroup in uml notation : composition or aggregation?
Comments
Post a Comment