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