public RedirectToActionResult AddComment(string commentText) { Comment stories = new Comment { AStoriesComments = commentText }; CommentRepo.AddComment(stories); return(RedirectToAction("Index")); }
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 })); }
public void AddComment(string comment, int id, int invo_id) { cm_repo.AddComment(comment, id, invo_id); }