public void Vote(VotePostBm postBm)
        {
            var entity = this.posts.GetById(postBm.Id);

            entity.Rate++;

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