public ActionResult Create()
 {
     ApplicantSecurityClearance applicantsecurityclearance = new ApplicantSecurityClearance();
     ViewBag.PossibleApplicants = applicantRepository.All;
     ViewBag.PossibleSecurityClearances = securityclearanceRepository.All;
     return View(applicantsecurityclearance);
 }
 public ActionResult Create(ApplicantSecurityClearance applicantsecurityclearance)
 {
     if (ModelState.IsValid) {
         applicantsecurityclearanceRepository.InsertOrUpdate(applicantsecurityclearance);
         applicantsecurityclearanceRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleApplicants = applicantRepository.All;
         ViewBag.PossibleSecurityClearances = securityclearanceRepository.All;
         return View(applicantsecurityclearance);
     }
 }
 public ViewResult Search(ApplicantSecurityClearance searchApplicantSecurityClearance)
 {
     if(searchApplicantSecurityClearance!=null)
     {
                     }
                 return View("Index",applicantsecurityclearanceRepository.AllIncluding(applicantsecurityclearance => applicantsecurityclearance.Applicant, applicantsecurityclearance => applicantsecurityclearance.SecurityClearance));
 }
 public void InsertOrUpdate(ApplicantSecurityClearance applicantsecurityclearance)
 {
     if (applicantsecurityclearance.ApplicantSecurityClearanceID == default(int)) {
         // New entity
         context.ApplicantSecurityClearance.Add(applicantsecurityclearance);
     } else {
         // Existing entity
         context.Entry(applicantsecurityclearance).State = EntityState.Modified;
     }
 }