Пример #1
0
        public UpdateMedicalRecordDTO UpdateMedicalRecord(int id, [FromBody] UpdateMedicalRecordDTO medicalRecord)
        {
            MedicalRecord medicalRecordEntity = _repository.GetMedicalRecordById(id);

            medicalRecord.Id = medicalRecordEntity.Id;
            _mapper.Map(medicalRecord, medicalRecordEntity);
            _repository.UpdateMedicalRecord(medicalRecordEntity);
            _repository.Save();
            return(medicalRecord);
        }
Пример #2
0
        public IActionResult UpdateMedicalRecord(int id, [FromBody] UpdateMedicalRecordDTO medicalRecord)
        {
            var updateMedicalRecord = _medicalRecordService.UpdateMedicalRecord(id, medicalRecord);

            return(Ok(updateMedicalRecord));
        }