예제 #1
0
        public InventoryManagementDTO ConvertEntityToDTO(InventoryManagement entity)
        {
            RoomDTO             room      = _roomConverter.ConvertEntityToDTO(entity.Room);
            RoomDTO             roomTo    = _roomConverter.ConvertEntityToDTO(entity.RoomTo);
            List <EquipmentDTO> equipment = entity.Equipment.Select(eq => _equipmentConverter.ConvertEntityToDTO(eq)).ToList();

            return(new InventoryManagementDTO(entity.Id, entity.Beginning, entity.End, room, equipment, roomTo));
        }
예제 #2
0
        public OrderDTO ConvertEntityToDTO(Order entity)
        {
            List <MedicineDTO>          medicineDTO    = entity.Medicine.Select(med => _medicineConverter.ConvertEntityToDTO(med)).ToList();
            List <MedicalConsumableDTO> consumablesDTO = entity.Consumebles.Select(con => _medicalConsumableConverter.ConvertEntityToDTO(con)).ToList();
            List <EquipmentDTO>         equipmentDTO   = entity.Equipments.Select(eq => _equipmentConverter.ConvertEntityToDTO(eq)).ToList();

            return(new OrderDTO(entity.Id, entity.Date, entity.Supplier, equipmentDTO, consumablesDTO, medicineDTO));
        }