public int Like(string id) { tb_Article articleModel = new tb_Article(); articleModel = ArticleBll.getModel(p => p.Id == id); articleModel.LikeNum++; return(ArticleBll.Edit(articleModel)?1:0); }
/// <summary> /// 详情页 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Detailed(string id) { tb_Article articleModel = new tb_Article(); articleModel = ArticleBll.getModel(p => p.Id == id); articleModel.ReadNum++; ArticleBll.Edit(articleModel); view_Article article = new view_Article(); article = vArticleBll.getModel(p => p.Id == id); return(View(article)); }