Пример #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));
 }