示例#1
0
        /* todo: delete methods not finished. User manager involvement required and also deleting a user policy not clear
         *
         * /*
         * // GET: Profile/Delete
         * public async Task<ActionResult> Delete()
         * {
         *  var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId()));
         *  JobSeeker jobSeeker = await db.JobSeekers.FindAsync(jobSeekerUser.JobSeekerID);
         *  //just in case but almost never happens
         *  if (jobSeeker == null)
         *  {
         *      return HttpNotFound();
         *  }
         *  return View(jobSeeker);
         * }
         *
         * // POST: Profile/Delete
         * [HttpPost, ActionName("Delete")]
         * [ValidateAntiForgeryToken]
         * public async Task<ActionResult> DeleteConfirmed(int id)
         * {
         *  JobSeeker jobSeeker = await db.JobSeekers.FindAsync(id);
         *  db.JobSeekers.Remove(jobSeeker);
         *  await db.SaveChangesAsync();
         *  return RedirectToAction("Index");
         * }
         *
         */
        // GET: Profile/Applications
        public async Task <ActionResult> Applications()
        {
            var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId()));
            var applications  = await bll.GetApplications(jobSeekerUser.JobSeekerID.Value);

            return(View(applications));
        }
示例#2
0
 public async Task <IEnumerable <ApplicationDto> > GetApplications(int jobSeekerId)
 {
     return(await bll.GetApplications(jobSeekerId));
 }