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)); }
public Election GetElectionByID(int id) { Election election = DTOConvertor.GetElectionFromDTO(electionRepository.GetElectionByID(id)); election.PartyProfiles = DTOConvertor.GetPartyProfilesFromDTO(electionRepository.GetAllPartyProfiles(DTOConvertor.GetElectionDTO(election))); return(election); }
public void CreateElection(Election election) { electionRepository.CreateElection(DTOConvertor.GetElectionDTO(election)); }