public void InsertOrUpdate(ApplicantDataPrivacyTemplate applicantdataprivacytemplate) { if (applicantdataprivacytemplate.ApplicantDataPrivacyTemplateID == default(int)) { // New entity context.ApplicantDataPrivacyTemplate.Add(applicantdataprivacytemplate); } else { // Existing entity context.Entry(applicantdataprivacytemplate).State = EntityState.Modified; } }
public ActionResult Create(ApplicantDataPrivacyTemplate applicantdataprivacytemplate) { if (ModelState.IsValid) { applicantdataprivacytemplateRepository.InsertOrUpdate(applicantdataprivacytemplate); applicantdataprivacytemplateRepository.Save(); return RedirectToAction("Index"); } else { return View(); } }
public ViewResult Search(ApplicantDataPrivacyTemplate searchApplicantDataPrivacyTemplate) { if (searchApplicantDataPrivacyTemplate != null) { } return View("Index", applicantdataprivacytemplateRepository.All); }