예제 #1
0
        public void CreateSameNameElection()
        {
            Election election = new Election
            {
                Name = "Tweede Kamerverkiezingen 2017",
                DistributableSeats = 150,
                Date          = DateTime.Now,
                PartyProfiles = new List <PartyProfile>()
            };

            electionRepository.CreateElection(DTOConvertor.GetElectionDTO(election));
        }
예제 #2
0
        public Election GetElectionByID(int id)
        {
            Election election = DTOConvertor.GetElectionFromDTO(electionRepository.GetElectionByID(id));

            election.PartyProfiles = DTOConvertor.GetPartyProfilesFromDTO(electionRepository.GetAllPartyProfiles(DTOConvertor.GetElectionDTO(election)));
            return(election);
        }
예제 #3
0
 public void CreateElection(Election election)
 {
     electionRepository.CreateElection(DTOConvertor.GetElectionDTO(election));
 }