public ActionResult Detail_AddComment(MovieCommentEntity comment) { var model = new DetailModel(this.ServiceManager, comment.MovieId); model.AddComment(this.Request, comment); return(this.Redirect(this.Url.Action("Detail", "Movie") + string.Format("?id={0}", comment.MovieId))); }
public void Insert(MovieCommentEntity item) { if (item == null) { throw new ArgumentNullException("item"); } this._repository.Insert(item); }
public void AddComment(HttpRequestBase request, MovieCommentEntity comment) { comment.CreatedTime = DateTime.Now; comment.IPAddress = Utils.GetRequestIPAddress(request); this.ServiceManager.MovieCommentService.Insert(comment); }