コード例 #1
0
 public ActionResult Create(SecurityClearance securityclearance)
 {
     if (ModelState.IsValid) {
         securityclearanceRepository.InsertOrUpdate(securityclearance);
         securityclearanceRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }
コード例 #2
0
 public void InsertOrUpdate(SecurityClearance securityclearance)
 {
     if (securityclearance.SecurityClearanceID == default(int)) {
         // New entity
         context.SecurityClearance.Add(securityclearance);
     } else {
         // Existing entity
         context.Entry(securityclearance).State = EntityState.Modified;
     }
 }
コード例 #3
0
 public ViewResult Search(SecurityClearance searchSecurityClearance)
 {
     if(searchSecurityClearance!=null)
     {
                     }
                 return View("Index",securityclearanceRepository.All);
 }