Пример #1
0
        public virtual ArtistComment CreateComment(string message, User author)
        {
            ParamIs.NotNullOrEmpty(() => message);
            ParamIs.NotNull(() => author);

            var comment = new ArtistComment(this, message, author);

            Comments.Add(comment);

            return(comment);
        }
Пример #2
0
        public virtual bool Equals(ArtistComment another)
        {
            if (another == null)
                return false;

            if (ReferenceEquals(this, another))
                return true;

            if (Id == 0)
                return false;

            return this.Id == another.Id;
        }
Пример #3
0
        public virtual bool Equals(ArtistComment another)
        {
            if (another == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, another))
            {
                return(true);
            }

            if (Id == 0)
            {
                return(false);
            }

            return(this.Id == another.Id);
        }