Пример #1
0
 public PrescriptionDTO ConvertEntityToDTO(Prescription entity)
 => new PrescriptionDTO(
     entity.Id,
     entity.Dosage,
     entity.Usage,
     entity.Period,
     _medicineConverter.ConvertEntityToDTO(entity.Medicine),
     entity.Date,
     _patientConverter.ConvertEntityToDTO(entity.Patient)
     );
Пример #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));
        }
Пример #3
0
 public PropositionDTO ConvertEntityToDTO(Proposition entity)
 => new PropositionDTO(
     entity.Id,
     entity.State,
     _medicineConverter.ConvertEntityToDTO(entity.Medicine)
     );