コード例 #1
0
 public IActionResult OnGet(string Content, int messageId)
 {
     if (Content != null)
     {
         Comment comment = new Comment();
         comment.Content   = Content;
         comment.MessageId = messageId;
         MessageBoard.AddComment(comment);
         TempData["Msg"] = "Comment saved!";
         return(RedirectToPage("./Timeline"));
     }
     return(Page());
 }
コード例 #2
0
 public async Task <ActionResult <int> > AddComment(string comment)
 {
     return(await MessageBoard.AddComment(comment));
 }