Exemplo n.º 1
0
 public IList<Vote> Post(Vote vote)
 {
     _pollService.Vote(vote);
     // foreach(var item in Votes){
     //  if (item.Answer == vote.Answer)
     //      item.Count++;
     //}
     return _pollService.GetVotes();
 }
Exemplo n.º 2
0
 public void Vote(Vote vote)
 {
     var single = Votes.SingleOrDefault(x => x.Answer == vote.Answer);
     if (single != null)
         single.Count++;
 }