public AssociationEndAttribute(Type otherEnd, string otherProperty, AssociationEndType type = AssociationEndType.None, int[] cardinality = null) { this.OtherEnd = otherEnd; this.OtherProperty = otherProperty; this.Type = type; this.Cardinality = cardinality; }
private static EndType ToEndType(AssociationEndType type) { switch (type) { case AssociationEndType.Composition: return(EndType.Composition); case AssociationEndType.Aggregation: return(EndType.Aggregation); case AssociationEndType.NotNavigable: return(EndType.NotNavigable); case AssociationEndType.Navigable: return(EndType.Navigable); case AssociationEndType.None: return(EndType.None); default: throw new IndexOutOfRangeException(); } }