Ejemplo n.º 1
0
        public static OutMachineDTO MachineToOutDto(Machine machine)
        {
            var machineDTO = new OutMachineDTO
            {
                Id          = machine.Id,
                Name        = machine.MachineName,
                Description = machine.Description,
                MachineType = machine.MachineType.Id,
                Active      = machine.Active
            };

            return(machineDTO);
        }
Ejemplo n.º 2
0
        public static Machine OutDtoToMachine(OutMachineDTO machineDTO)
        {
            var machineType = new MachineType();

            machineType.Id = machineDTO.MachineType;

            var machine = new Machine
            {
                Id          = machineDTO.Id,
                MachineName = (machineDTO.Name),
                Description = (machineDTO.Description),
                MachineType = machineType,
                Active      = machineDTO.Active
            };

            return(machine);
        }