예제 #1
0
        public void Vote(VotePostBm postBm)
        {
            var entity = this.posts.GetById(postBm.Id);

            entity.Rate++;

            this.posts.Update(entity);
            this.posts.SaveChanges();
        }
예제 #2
0
 public ActionResult Vote(VotePostBm postBm)
 {
     this.service.Vote(postBm);
     return(RedirectToAction("Index", "Home"));
 }