public IActionResult OnPost(CreateCommentVM command, string slug) { command.Type = CommentOwnerType.ProductType; if (!ModelState.IsValid) { return(RedirectToPage("Product", new { id = slug, message = "همه اطلاعات را وارد نمائید!", messageColor = "danger" })); } var result = _commentApplication.CreateComment(command); return(RedirectToPage("Product", new { id = slug, message = "نظر شما با موفقیت ثبت شد!", messageColor = "success" })); }