public ActionResult DeleteConfirmed(int id) { kinderInfoSet kinderInfoSet = db.kinderInfoSets.Find(id); db.kinderInfoSets.Remove(kinderInfoSet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,Type,PostCode,Suburb,Email,Rating,Address,Location")] kinderInfoSet kinderInfoSet) { if (ModelState.IsValid) { db.Entry(kinderInfoSet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kinderInfoSet)); }
public ActionResult Create([Bind(Include = "Id,Name,Type,PostCode,Suburb,Email,Rating,Address,Location")] kinderInfoSet kinderInfoSet) { if (ModelState.IsValid) { db.kinderInfoSets.Add(kinderInfoSet); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kinderInfoSet)); }
// GET: kinderInfoSets/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } kinderInfoSet kinderInfoSet = db.kinderInfoSets.Find(id); if (kinderInfoSet == null) { return(HttpNotFound()); } return(View(kinderInfoSet)); }