Esempio n. 1
0
 public void Edit(UserComment userComment)
 {
     _repo.Update(userComment);
     _repo.Save();
 }
Esempio n. 2
0
 public ActionResult AddComment(Guid movieId, string comment)
 {
     var userComment = new UserComment
     {
         Id = Guid.NewGuid(),
         Comment = comment,
         Date = DateTime.Now,
         MovieId = movieId,
         UserId = User.Identity.GetUserId()
     };
     _userCommentService.AddUserComment(userComment);
     if (Request.IsAjaxRequest())
     {
         ViewBag.UserName = User.Identity.Name;
         ViewBag.Date = userComment.Date;
         ViewBag.Comment = userComment.Comment;
         return PartialView();
     }
     return RedirectToAction("Details", new {id = movieId});
 }
Esempio n. 3
0
 public void AddUserComment(UserComment userComment)
 {
     _repo.Insert(userComment);
     _repo.Save();
 }