public async Task<IActionResult> OnPostAsync(int? id) { if (!ModelState.IsValid) { return Page(); } var comment = new ServiceReferencePostComment.CommentDTO(); // acest tip este vazut in serviciu int postId = 0; postId = id.Value; comment.PostPostId = postId; comment.Text = CommentDTO.Text; var result = await pcc.SubmitCommentAsync(comment); if (result is null) { return RedirectToAction("Error"); } return RedirectToPage("/Posts/Index"); }
public System.Threading.Tasks.Task <ServiceReferencePostComment.CommentDTO> AddCommmentAsync(int postId, ServiceReferencePostComment.CommentDTO comment) { return(base.Channel.AddCommmentAsync(postId, comment)); }
public System.Threading.Tasks.Task <ServiceReferencePostComment.CommentDTO> UpdateCommentAsync(ServiceReferencePostComment.CommentDTO oldComment, ServiceReferencePostComment.CommentDTO newComment) { return(base.Channel.UpdateCommentAsync(oldComment, newComment)); }
public System.Threading.Tasks.Task <ServiceReferencePostComment.CommentDTO> SubmitCommentAsync(ServiceReferencePostComment.CommentDTO comment) { return(base.Channel.SubmitCommentAsync(comment)); }