public ActionResult Create(EmploymentLeaveReasonCategory employmentleavereasoncategory)
 {
     if (ModelState.IsValid) {
         employmentleavereasoncategoryRepository.InsertOrUpdate(employmentleavereasoncategory);
         employmentleavereasoncategoryRepository.Save();
         return RedirectToAction("Index");
     } else {
         return View(employmentleavereasoncategory);
     }
 }
 public ViewResult Search(EmploymentLeaveReasonCategory searchEmploymentLeaveReasonCategory)
 {
     if(searchEmploymentLeaveReasonCategory!=null)
     {
                     }
                 return View("Index",employmentleavereasoncategoryRepository.All);
 }
 public ActionResult Create()
 {
     EmploymentLeaveReasonCategory employmentleavereasoncategory = new EmploymentLeaveReasonCategory();
     return View(employmentleavereasoncategory);
 }
 public void InsertOrUpdate(EmploymentLeaveReasonCategory employmentleavereasoncategory)
 {
     if (employmentleavereasoncategory.EmploymentLeaveReasonCategoryID == default(int)) {
         // New entity
         context.EmploymentLeaveReasonCategory.Add(employmentleavereasoncategory);
     } else {
         // Existing entity
         context.Entry(employmentleavereasoncategory).State = EntityState.Modified;
     }
 }