Exemplo n.º 1
0
        public async Task <Comment> Create(CommentCreate create, User user)
        {
            Comment c = factory.Create(create, user);
            await repo.Add(c);

            await bus.Dispatch(new CommentCreateEvent(c));

            return(c);
        }
Exemplo n.º 2
0
 internal Comment(CommentCreate creationData, User user)
 {
     PostId       = creationData.PostId;
     Body         = creationData.Body;
     ParentId     = creationData.ParentId;
     CreationDate = DateTime.UtcNow;
     UserId       = user.Id;
     Votes        = new VoteStats();
 }
Exemplo n.º 3
0
 public Comment Create(CommentCreate data, User user) => new Comment(data, user);