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

            Apply(@event);

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

            Apply(@event);

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