Esempio n. 1
0
        public JsonResult AddRandomComment(int id)
        {
            RandomCommentModel rcm = new RandomCommentModel();

            commentModel.Insert(id, rcm.generatedRandom, "Secure Random", JsonConvert.SerializeObject(rcm.freq, Formatting.Indented));
            return(Json(true, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
 /// <summary>
 /// 新增评论
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Add(CommentModel model)
 {
     model.LastUpdatedDate = DateTime.Now;
     return(!string.IsNullOrWhiteSpace(model.Insert()));
 }