Esempio n. 1
0
        public void Comment(Comment comment)
        {
            if (enabled == false)
            {
                throw new DomainException("The blog is disabled. Enable this before making any changes.");
            }

            if (published == true)
            {
                throw new DomainException("The post is already hidden.");
            }

            Raise(CommentCreatedDomainEvent.Create(this, comment.Id, comment.Message));
        }