public void Edit(UserComment userComment)
 {
     _repo.Update(userComment);
     _repo.Save();
 }
 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});
 }
 public void AddUserComment(UserComment userComment)
 {
     _repo.Insert(userComment);
     _repo.Save();
 }