Example #1
0
 public async Task HandleAsync(CourseDiscussionReplyCommand command)
 {
     _context.DiscussionComment.Add(new DiscussionComment()
     {
         Content       = command.Content,
         DiscussionId  = command.DiscussionId,
         SubmittedAt   = DateTime.Now,
         SubmittedById = command.SubmittedById
     });
     await _context.SaveChangesAsync();
 }
Example #2
0
        public async Task <IActionResult> ReplyToDiscussion(int courseId, CourseDiscussionReplyCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }