public ActionResult Create(MaritalStatus maritalstatus)
        {
            if (ModelState.IsValid)
            {
                db.MaritalStatus.Add(maritalstatus);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(maritalstatus);
        }
        public ActionResult Create(MaritalStatus maritalstatus)
        {
            if (ModelState.IsValid)
            {
                repository.Insert(maritalstatus);
                repository.Save();
                return RedirectToAction("Index");
            }

            return View(maritalstatus);
        }
 public ActionResult Edit(MaritalStatus maritalstatus)
 {
     if (ModelState.IsValid)
     {
         db.Entry(maritalstatus).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(maritalstatus);
 }