Ejemplo n.º 1
0
        public RedirectToActionResult AddComment(string commentText)
        {
            Comment stories = new Comment {
                AStoriesComments = commentText
            };

            CommentRepo.AddComment(stories);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 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 }));
        }
Ejemplo n.º 3
0
 public void AddComment(string comment, int id, int invo_id)
 {
     cm_repo.AddComment(comment, id, invo_id);
 }