示例#1
0
        public RedirectToActionResult AddComment(string commentText)
        {
            Comment stories = new Comment {
                AStoriesComments = commentText
            };

            CommentRepo.AddComment(stories);

            return(RedirectToAction("Index"));
        }
示例#2
0
        public async Task <IActionResult> Comment(string review, double rating, int id)
        {
            var user = await GetCurrentUserAsync();

            var NewComment = new Comment {
                Review   = review,
                BookId   = id,
                Username = user.UserName,
                Rating   = rating
            };

            _commentRepo.AddComment(NewComment);
            return(RedirectToAction("Details", "Book", new { id = id }));
        }
示例#3
0
 public void AddComment(string comment, int id, int invo_id)
 {
     cm_repo.AddComment(comment, id, invo_id);
 }