public JobSeekerRegistrationResult RegisterJobSeeker(RegisterJobSeekerCommand command)
        {
            JobSeeker jobSeeker = new JobSeeker(command.Email, command.FirstName, command.LastName, false);
            JobSeekerRegistrationResult result = new JobSeekerRegistrationResult(jobSeeker);
            try
            {
                this._jobSeekerRegistrationService.Register(jobSeeker);
                this._jobSeekerRepository.Save(jobSeeker);
            } catch(Exception ex)
            {
                result.Error = ex;
            }

            return result;
        }
Пример #2
0
        public JobSeekerRegistrationResult RegisterJobSeeker(RegisterJobSeekerCommand command)
        {
            JobSeeker jobSeeker = new JobSeeker(command.Email, command.FirstName, command.LastName, false);
            JobSeekerRegistrationResult result = new JobSeekerRegistrationResult(jobSeeker);

            try
            {
                this._jobSeekerRegistrationService.Register(jobSeeker);
                this._jobSeekerRepository.Save(jobSeeker);
            } catch (Exception ex)
            {
                result.Error = ex;
            }

            return(result);
        }