Exemplo n.º 1
0
        public void Vote(VotePostBm postBm)
        {
            var entity = this.posts.GetById(postBm.Id);

            entity.Rate++;

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