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