public ActionResult Edit(int id, FamilyProduct model)
 {
     try
     {
         // TODO: Add update logic here
         if (ModelState.IsValid)
         {
             context.Entry(model).State = System.Data.Entity.EntityState.Modified;
             context.SaveChanges();
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View());
         }
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Create(FamilyProduct model)
 {
     try
     {
         // TODO: Add insert logic here
         if (ModelState.IsValid)
         {
             context.FamilyProduct.Add(model);
             context.SaveChanges();
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View());
         }
     }
     catch
     {
         return(View());
     }
 }