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()); }
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); }
public Party GetPartyByID(int id) { Party party = DTOConvertor.GetPartyFromDTO(partyRepository.GetPartyByID(id)); party.History = DTOConvertor.GetPartyList(partyRepository.GetPartyHistory(DTOConvertor.GetPartyDTO(party))); return(party); }
public void CreateParty(Party party) { partyRepository.CreateParty(DTOConvertor.GetPartyDTO(party)); }