コード例 #1
0
        public static EquipmentInExamination EquipmentInExaminationDTOToEquipmentInExamination(EquipmentInExaminationDTO equipmentInExaminationDTO)
        {
            EquipmentInExamination equipmentInExamination = new EquipmentInExamination();

            equipmentInExamination.EquipmentTypeID = equipmentInExaminationDTO.EquipmentID;
            equipmentInExamination.ExaminationId   = equipmentInExaminationDTO.ExaminationId;
            return(equipmentInExamination);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
 }
コード例 #5
0
 public EquipmentInExamination AddEquipmentInExamination(EquipmentInExamination equipmentInExamination)
 {
     return(_equipmentInExaminationRepository.AddEquipmentInExamination(equipmentInExamination));
 }