public RedirectResult Apply(int id)
 {
     EM_JobPostings_Shortlistings job = new EM_JobPostings_Shortlistings();
     int CandidateID = (int)Session["CandidateID"];
     job.JobID = (int)id;
     job.CandidateID = CandidateID;
     job.Result = "Result Awaiting";
     db.EM_JobPostings_Shortlistings.Add(job);
     db.SaveChanges();
     return Redirect("~/");
 }
        public ActionResult Create(EM_JobPostings_Shortlistings em_jobpostings_shortlistings)
        {
            if (ModelState.IsValid)
            {
                db.EM_JobPostings_Shortlistings.Add(em_jobpostings_shortlistings);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.CandidateID = new SelectList(db.CA_PersonalData, "CandidateID", "FirstName", em_jobpostings_shortlistings.CandidateID);
            ViewBag.JobID = new SelectList(db.EM_JobPostings, "JobID", "EmployerID", em_jobpostings_shortlistings.JobID);
            ViewBag.Result = new SelectList(db.MS_ResultMaster, "Result", "Result", em_jobpostings_shortlistings.Result);
            return View(em_jobpostings_shortlistings);
        }