public CommentRelationship Clone(Comment comment, IEntity entity) { CommentRelationship relationship = new CommentRelationship(comment, entity); relationship.CopyFrom(this); return(relationship); }
/// <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); }
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); } }
protected virtual void AddCommentRelationship(CommentRelationship commentRelationship) { AddRelationship(commentRelationship); }