示例#1
0
文件: Model.cs 项目: carlcnx/EnClass
        /// <exception cref="RelationshipException">
        /// Cannot create relationship between the two types.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="parentType"/> or <paramref name="innerType"/> is null.
        /// </exception>
        public NestingRelationship AddNesting(CompositeType parentType, TypeBase innerType)
        {
            NestingRelationship nesting = new NestingRelationship(parentType, innerType);

            AddNesting(nesting);
            return(nesting);
        }
示例#2
0
        public NestingRelationship Clone(CompositeType parentType, TypeBase innerType)
        {
            NestingRelationship nesting = new NestingRelationship(parentType, innerType);

            nesting.CopyFrom(this);
            return(nesting);
        }
示例#3
0
文件: Model.cs 项目: carlcnx/EnClass
 public bool InsertNesting(NestingRelationship nesting)
 {
     if (nesting != null && !relationships.Contains(nesting) &&
         entities.Contains(nesting.First) && entities.Contains(nesting.Second))
     {
         AddNesting(nesting);
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#4
0
文件: Model.cs 项目: carlcnx/EnClass
 protected virtual void AddNesting(NestingRelationship nesting)
 {
     AddRelationship(nesting);
 }