public static PartyProfileDTO GetPartyProfileDTO(PartyProfile party) { PartyProfileDTO dto = new PartyProfileDTO { ID = party.ID, Votes = party.Votes, Seats = party.Seats, Party = GetPartyDTO(party.Party) }; return(dto); }
public static PartyProfile GetPartyProfileFromDTO(PartyProfileDTO dto) { PartyProfile party = new PartyProfile { ID = dto.ID, Votes = dto.Votes, Seats = dto.Seats, Party = GetPartyFromDTO(dto.Party) }; return(party); }
public void Save(int id, PartyProfile partyProfile) { partyProfileRepository.Save(id, DTOConvertor.GetPartyProfileDTO(this)); }