Пример #1
0
 public bool VoteForIdea(Voting voting)
 {
     using (var db = new ActiveCitizenContext())
     {
         db.Voting.Add(voting);
         db.DirectionIdea.Find(voting.IdeaId).VotesCount++;
         return(db.SaveChanges() > 1);
     }
 }