Ejemplo n.º 1
0
        public void VoteForPresident(PartyMember member, PartyPresidentCandidate candidate)
        {
            var party = member.Party;

            PartyPresidentVote vote = new PartyPresidentVote()
            {
                CitizenID = member.CitizenID,
                PartyPresidentCandidateID = candidate.ID,
                PartyPresidentVoting      = party.GetLastPresidentVoting()
            };

            partyRepository.AddPartyPresidentVote(vote);
            partyRepository.SaveChanges();
        }
Ejemplo n.º 2
0
 public void AddPartyPresidentVote(PartyPresidentVote vote)
 {
     context.PartyPresidentVotes.Add(vote);
 }