public ActionResult Create() { ApplicantProfileWidgetAccess applicantprofilewidgetaccess = new ApplicantProfileWidgetAccess(); ViewBag.PossibleApplicants = applicantRepository.All; ViewBag.PossibleProfileAccessUsers = userRepository.All; return View(applicantprofilewidgetaccess); }
public ActionResult Create(ApplicantProfileWidgetAccess applicantprofilewidgetaccess) { if (ModelState.IsValid) { applicantprofilewidgetaccessRepository.InsertOrUpdate(applicantprofilewidgetaccess); applicantprofilewidgetaccessRepository.Save(); return RedirectToAction("Index"); } else { ViewBag.PossibleApplicants = applicantRepository.All; ViewBag.PossibleProfileAccessUsers = userRepository.All; return View(applicantprofilewidgetaccess); } }
public void InsertOrUpdate(ApplicantProfileWidgetAccess applicantprofilewidgetaccess) { if (applicantprofilewidgetaccess.ApplicantProfileWidgetAccessID == default(int)) { // New entity context.ApplicantProfileWidgetAccess.Add(applicantprofilewidgetaccess); } else { // Existing entity context.Entry(applicantprofilewidgetaccess).State = EntityState.Modified; } }
public ViewResult Search(ApplicantProfileWidgetAccess searchApplicantProfileWidgetAccess) { if(searchApplicantProfileWidgetAccess!=null) { } return View("Index",applicantprofilewidgetaccessRepository.AllIncluding(applicantprofilewidgetaccess => applicantprofilewidgetaccess.Applicant, applicantprofilewidgetaccess => applicantprofilewidgetaccess.ProfileAccessUser)); }