public FindCandidateDto PostCandidate(CreateCandidateDto cand) { Candidate candidatModel = TransformDtoToModel(cand); Candidate candidatCreated = candidateRepository.Create(candidatModel); return(TransformModelToDto(candidatCreated)); }
public async Task <Candidate> Create(Candidate candidate) { _loggerManager.LogInfo($"Creating new candidate with id {candidate.Id.ToString()}"); var returnedCandidate = await _candidateRepository.Create(candidate); if (returnedCandidate == null) { _loggerManager.LogError("unable to create candidate"); } return(returnedCandidate); }