コード例 #1
0
        public RecruiterUser MapToRecruiterUser(RecruiterModel recruiterModel)
        {
            var recruiter = new RecruiterUser()
            {
                CompanyDescription = recruiterModel.CompanyDescription,
                CompanyName = recruiterModel.CompanyName,

            };
            return recruiter;
        }
コード例 #2
0
 public RecruiterViewModel MapToRecruiterViewModel(RecruiterModel recruiterModel, string recruiterName, string recruiterEmail)
 {
     return new RecruiterViewModel(recruiterModel, recruiterName, recruiterEmail);
 }
コード例 #3
0
 public RecruiterModel MapToRecruiterModel(RecruiterUser recruiter)
 {
     var recruiterModel = new RecruiterModel(recruiter.CompanyName, recruiter.CompanyDescription);
     return recruiterModel;
 }
コード例 #4
0
 public async Task UpdateRecruiterModelAsync(RecruiterModel model, string recruiterId)
 {
     var recruiter = _mappingService.MapToRecruiterUser(model);
     await _dbService.UpdateRecruiterAsync(recruiter, recruiterId);
 }
コード例 #5
0
 public async Task<RecruiterViewModel> GetRecruiterViewModelByIdAsync(RecruiterModel recruiterModel, string recruiterId)
 {
     var recruiter = await _dbService.GetRecruiterByIdAsync(recruiterId);
     var recruiterViewModel = _mappingService.MapToRecruiterViewModel(recruiterModel, recruiter.Name, recruiter.Email);
     return recruiterViewModel;
 }
コード例 #6
0
 public RecruiterViewModel(RecruiterModel recruiter, string name, string email)
 {
     Recruiter = recruiter;
     Name = name;
     Email = email;
 }
コード例 #7
0
 public async Task<ActionResult> Index(RecruiterModel model)
 {
     var currentUserId = _authenticationService.GetUserIdFromRequest(Request);
     await _applicationService.UpdateRecruiterModelAsync(model, currentUserId);
     return RedirectToAction("Index", "Home");
 }