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)); }
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)); }