// GET: Profile/Details public async Task <ActionResult> Details() { var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId())); JobSeeker jobSeeker = await bll.GetJobSeekerById(jobSeekerUser.JobSeekerID.Value); //just in case but almost never happens if (jobSeeker == null) { return(HttpNotFound()); } return(View(jobSeeker)); }
public async Task <IHttpActionResult> GetJobSeeker(int jobSeekerId) { JobSeeker jobSeeker = await bll.GetJobSeekerById(jobSeekerId); if (jobSeeker == null) { return(NotFound()); } var dto = AutoMapper.Mapper.Map <JobSeeker, JobSeekerDto>(jobSeeker); return(Ok(dto)); }
// GET: JobSeekers/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var jobSeeker = await bll.GetJobSeekerById(id.Value); if (jobSeeker == null) { return(HttpNotFound()); } var dto = AutoMapper.Mapper.Map <JobSeeker, JobSeekerDto>(jobSeeker); return(View(dto)); }