public static EquipmentInExamination EquipmentInExaminationDTOToEquipmentInExamination(EquipmentInExaminationDTO equipmentInExaminationDTO) { EquipmentInExamination equipmentInExamination = new EquipmentInExamination(); equipmentInExamination.EquipmentTypeID = equipmentInExaminationDTO.EquipmentID; equipmentInExamination.ExaminationId = equipmentInExaminationDTO.ExaminationId; return(equipmentInExamination); }
public ActionResult AddEquipmentInExamination([FromBody] List <EquipmentInExaminationDTO> equipmentInExaminationDTOs) { List <EquipmentInExaminationDTO> addedEquipmentInExaminationDTOs = new List <EquipmentInExaminationDTO>(); foreach (EquipmentInExaminationDTO equipmentInExaminationDTO in equipmentInExaminationDTOs) { EquipmentInExamination equipmentInExamination = EquipmentInExaminationMapper.EquipmentInExaminationDTOToEquipmentInExamination(equipmentInExaminationDTO); EquipmentInExamination addedEquipment = _equipmentInExaminationService.AddEquipmentInExamination(equipmentInExamination); addedEquipmentInExaminationDTOs.Add(EquipmentInExaminationMapper.EquipmentInExaminationToEquipmentInExaminationDTO(addedEquipment)); } return(Ok(addedEquipmentInExaminationDTOs)); }
public static EquipmentInExaminationDTO EquipmentInExaminationToEquipmentInExaminationDTO(EquipmentInExamination equipmentInExamination) { EquipmentInExaminationDTO equipmentInExaminationDTO = new EquipmentInExaminationDTO(); equipmentInExaminationDTO.EquipmentID = equipmentInExamination.EquipmentTypeID; equipmentInExaminationDTO.ExaminationId = equipmentInExamination.ExaminationId; return(equipmentInExaminationDTO); }
public EquipmentInExamination AddEquipmentInExamination(EquipmentInExamination equipmentInExamination) { _context.EquipmentInExamination.Add(equipmentInExamination); _context.SaveChanges(); return(equipmentInExamination); }
public EquipmentInExamination AddEquipmentInExamination(EquipmentInExamination equipmentInExamination) { return(_equipmentInExaminationRepository.AddEquipmentInExamination(equipmentInExamination)); }