コード例 #1
0
        public CommentRelationship Clone(Comment comment, IEntity entity)
        {
            CommentRelationship relationship = new CommentRelationship(comment, entity);

            relationship.CopyFrom(this);
            return(relationship);
        }
コード例 #2
0
ファイル: Model.cs プロジェクト: carlcnx/EnClass
        /// <exception cref="ArgumentNullException">
        /// <paramref name="comment"/> or <paramref name="entity"/> is null.
        /// </exception>
        public virtual CommentRelationship AddCommentRelationship(Comment comment, IEntity entity)
        {
            CommentRelationship commentRelationship = new CommentRelationship(comment, entity);

            AddCommentRelationship(commentRelationship);
            return(commentRelationship);
        }
コード例 #3
0
ファイル: Model.cs プロジェクト: carlcnx/EnClass
 public bool InsertCommentRelationship(CommentRelationship commentRelationship)
 {
     if (commentRelationship != null && !relationships.Contains(commentRelationship) &&
         entities.Contains(commentRelationship.First) && entities.Contains(commentRelationship.Second))
     {
         AddCommentRelationship(commentRelationship);
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #4
0
ファイル: Model.cs プロジェクト: carlcnx/EnClass
 protected virtual void AddCommentRelationship(CommentRelationship commentRelationship)
 {
     AddRelationship(commentRelationship);
 }