public async Task <IActionResult> AddQualification(QualDto qualDto) { var qual = _mapper.Map <Qualification>(qualDto); _appRepository.Add(qual); await _unitOfWork.SaveAll(); return(Ok(qual)); }
public async Task <IActionResult> UpdateQualification(QualDto qualToUpdate) { var qualFromRepo = await _appRepository.FindQualification(qualToUpdate.Id); if (qualFromRepo == null) { return(NotFound()); } _mapper.Map <QualDto, Qualification>(qualToUpdate, qualFromRepo); await _unitOfWork.SaveAll(); return(NoContent()); }