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); }
public IActionResult UpdateMedicalRecord(int id, [FromBody] UpdateMedicalRecordDTO medicalRecord) { var updateMedicalRecord = _medicalRecordService.UpdateMedicalRecord(id, medicalRecord); return(Ok(updateMedicalRecord)); }