Beispiel #1
0
 public IActionResult OnGet(int id, string CommentText)
 {
     if (CommentText != null)
     {
         comment             = new Comment();
         comment.MessageId   = id;
         comment.CommentText = CommentText;
         messageBoardData.AddComment(comment);
         return(RedirectToPage("./MessageList"));
     }
     return(Page());
 }
Beispiel #2
0
 public async Task <ActionResult <int> > addComment(string str)
 {
     return(await MessageBoardData.AddComment(str));
 }