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