Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public ActionResult Create(family family) { try { if (ModelState.IsValid) { db.families.Add(family); db.SaveChanges(); TempData["Message2"] = "family record added successfully."; GetData(); FamilyRepository.AddRecord(family); //return Content("Fami!ly record created successfully"); return(RedirectToAction("Create")); } } catch (Exception ex) { TempData["Message2"] = "Error adding family"; } GetData(); return(View(family)); }