コード例 #1
0
        public void CreateParty()
        {
            Party party = new Party
            {
                Abbreviation = "PP",
                Name         = "Piraten partij",
                Leader       = "Ancilla Tilia"
            };

            partyRepository.CreateParty(DTOConvertor.GetPartyDTO(party));
            Assert.IsTrue(partyRepository.GetAllParties().Any());
        }
コード例 #2
0
        public List <Party> GetAllParties()
        {
            List <Party> parties = DTOConvertor.GetPartyList(partyRepository.GetAllParties());

            foreach (Party party in parties)
            {
                party.History = DTOConvertor.GetPartyList(partyRepository.GetPartyHistory(DTOConvertor.GetPartyDTO(party)));
            }
            return(parties);
        }
コード例 #3
0
        public Party GetPartyByID(int id)
        {
            Party party = DTOConvertor.GetPartyFromDTO(partyRepository.GetPartyByID(id));

            party.History = DTOConvertor.GetPartyList(partyRepository.GetPartyHistory(DTOConvertor.GetPartyDTO(party)));
            return(party);
        }
コード例 #4
0
 public void CreateParty(Party party)
 {
     partyRepository.CreateParty(DTOConvertor.GetPartyDTO(party));
 }