Beispiel #1
0
        public void AddComment(string author, string content)
        {
            var commentId = Guid.NewGuid();
            var @event    = new CommentAdded(commentId, author, content);

            Apply(@event);

            AppendEvent(@event);
        }
Beispiel #2
0
        public void AddComment(string author, string content)
        {
            var commentId = Guid.NewGuid();
            var @event = new CommentAdded(commentId, author, content);

            Apply(@event);

            AppendEvent(@event);
        }
Beispiel #3
0
 public void Apply(CommentAdded @event)
 {
     _comments.Add(new Comment
     {
         Id       = @event.CommentId,
         Approved = false,
         Author   = @event.Author,
         Content  = @event.Content
     });
 }
Beispiel #4
0
 public void Apply(CommentAdded @event)
 {
     _comments.Add(new Comment
     {
         Id = @event.CommentId,
         Approved = false,
         Author = @event.Author,
         Content = @event.Content
     });
 }