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