public async Task <ResponseApi> Handle(DeleteJobExperienceCommand request, CancellationToken cancellationToken) { try { JobExperience jobExperience = _mapper.Map <JobExperience>(await _jobExperienceRepository.Get(request.IdJobExperience)); await _jobExperienceRepository.Delete(jobExperience); return(new ResponseApi(true, "Job experience deleted sucessfuly", null)); } catch (Exception e) { return(new ResponseApi(false, "Error...", e)); } }
public async Task <IActionResult> DeleteLanguage([FromRoute] DeleteJobExperienceCommand deleteLanguage) { var result = await _mediator.Send(deleteLanguage); return(Ok(result)); }