Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public void Save(int id, PartyProfile partyProfile)
 {
     partyProfileRepository.Save(id, DTOConvertor.GetPartyProfileDTO(this));
 }