public ActionResult Create()
 {
     ApplicantProfileViewer applicantprofileviewer = new ApplicantProfileViewer();
     ViewBag.PossibleApplicants = applicantRepository.All;
     ViewBag.PossibleViewedByUsers = userRepository.All;
     return View(applicantprofileviewer);
 }
 public ActionResult Create(ApplicantProfileViewer applicantprofileviewer)
 {
     if (ModelState.IsValid) {
         applicantprofileviewerRepository.InsertOrUpdate(applicantprofileviewer);
         applicantprofileviewerRepository.Save();
         return RedirectToAction("Index");
     } else {
         ViewBag.PossibleApplicants = applicantRepository.All;
         ViewBag.PossibleViewedByUsers = userRepository.All;
         return View(applicantprofileviewer);
     }
 }
 public void InsertOrUpdate(ApplicantProfileViewer applicantprofileviewer)
 {
     if (applicantprofileviewer.ApplicantProfileViewerID == default(int)) {
         // New entity
         context.ApplicantProfileViewer.Add(applicantprofileviewer);
     } else {
         // Existing entity
         context.Entry(applicantprofileviewer).State = EntityState.Modified;
     }
 }
 public ViewResult Search(ApplicantProfileViewer searchApplicantProfileViewer)
 {
     if(searchApplicantProfileViewer!=null)
     {
                     }
                 return View("Index",applicantprofileviewerRepository.AllIncluding(applicantprofileviewer => applicantprofileviewer.Applicant, applicantprofileviewer => applicantprofileviewer.ViewedByUser));
 }