コード例 #1
0
        public ActionResult Detail_AddComment(DiaryCommentEntity comment)
        {
            var model = new DetailModel(this.ServiceManager, comment.DiaryId);

            model.AddComment(this.Request, comment);

            return(this.Redirect(this.Url.Action("Detail", "Diary") + string.Format("?id={0}", comment.DiaryId)));
        }
コード例 #2
0
        public void Insert(DiaryCommentEntity item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            this._repository.Insert(item);
        }
コード例 #3
0
 public void AddComment(HttpRequestBase request, DiaryCommentEntity comment)
 {
     comment.CreatedTime = DateTime.Now;
     comment.IPAddress   = Utils.GetRequestIPAddress(request);
     this.ServiceManager.DiaryCommentService.Insert(comment);
 }