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);
        }