Ejemplo n.º 1
0
 public Gearbox ConvertGearBox(GearboxDTO gearboxDTO)
 {
     return(new Gearbox
     {
         Id = gearboxDTO.Id,
         Name = gearboxDTO.Name,
         Price = gearboxDTO.Price,
         Producer = gearboxDTO.Producer,
         Quantity = gearboxDTO.Quantity,
         Type = gearboxDTO.Type
     });
 }
Ejemplo n.º 2
0
        public GearboxDTO ConvertTOGearboxDTO(Gearbox gearbox)
        {
            GearboxDTO gearboxDTO = new GearboxDTO()
            {
                Id       = gearbox.Id,
                Name     = gearbox.Name,
                Price    = gearbox.Price,
                Producer = gearbox.Producer,
                Quantity = gearbox.Quantity,
                Type     = gearbox.Type
            };

            return(gearboxDTO);
        }