コード例 #1
0
        public virtual SimpleAssociatedEntity AddAssociation(string aName)
        {
            var result = new SimpleAssociatedEntity {
                Name = aName, Owner = this
            };

            AddAssociation(result);
            return(result);
        }
コード例 #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 + "]");
     }
 }
コード例 #3
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 + "]");
			}
		}
コード例 #4
0
 public virtual void AddAssociation(SimpleAssociatedEntity association)
 {
     association.BindToOwner(this);
 }
コード例 #5
0
		public virtual void AddAssociation(SimpleAssociatedEntity association)
		{
			association.BindToOwner(this);
		}
コード例 #6
0
		public virtual SimpleAssociatedEntity AddAssociation(string aName)
		{
			var result = new SimpleAssociatedEntity {Name = aName, Owner = this};
			AddAssociation(result);
			return result;
		}