public JsonResult AddComment(string content, int houseId, int userId) { bool reasult = _commentApplication.AddComment(content, houseId, userId); string message = null; if (reasult == false) { message = "失败"; return(Json(message)); } else { message = "成功"; return(Json(message)); } }
public IActionResult OnPost(AddComment comment) { _commentApplication.AddComment(comment); return(RedirectToPage("Single", new { id = comment.ArticleId })); }
public IActionResult OnPost(AddComment comment, string productSlug) { var operationResult = _commentApplication.AddComment(comment); return(RedirectToPage("Product", new { id = productSlug })); }
public IActionResult OnPost(AddComment command, string Slug) { _commentApplication.AddComment(command); return(RedirectToPage("/Product", new { Id = Slug })); }