public void EditCandidate(Models.Candidate candidate, Guid id) { if (candidate.IsValid()) { _candidateRepository.EditCandidate(candidate, id); } }
public Guid AddCandidate(CandidateValueObject candidate) { var candidateEntity = new Models.Candidate { Address = candidate.Address, Cpf = candidate.Cpf, JobOpportunity = _jobOpportunityService.GetJobOpportunity(candidate.JobOpportunityId), Name = candidate.Name, Phone = candidate.Phone, Tecnologies = candidate.Tecnologies.Select(c => new CandidateTecnology { Tecnology = _tecnologyService.GetTecnology(c) }).ToList() }; return(candidateEntity.IsValid() ? _candidateRepository.AddCandidate(candidateEntity) : Guid.Empty); }