Ejemplo n.º 1
0
        public virtual SimpleAssociatedEntity AddAssociation(string aName)
        {
            var result = new SimpleAssociatedEntity {
                Name = aName, Owner = this
            };

            AddAssociation(result);
            return(result);
        }
Ejemplo n.º 2
0
 public virtual void RemoveAssociation(SimpleAssociatedEntity association)
 {
     if (AssociatedEntities.Contains(association))
     {
         association.UnbindFromCurrentOwner();
     }
     else
     {
         throw new ArgumentException("SimpleAssociatedEntity [" + association + "] not currently bound to this [" + this + "]");
     }
 }
Ejemplo n.º 3
0
 public virtual void AddAssociation(SimpleAssociatedEntity association)
 {
     association.BindToOwner(this);
 }