Пример #1
0
 public void EditCandidate(Models.Candidate candidate, Guid id)
 {
     if (candidate.IsValid())
     {
         _candidateRepository.EditCandidate(candidate, id);
     }
 }
Пример #2
0
        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);
        }