public ActionResult DeleteConfirmed(int id) { bellary bellary = db.bellaries.Find(id); db.bellaries.Remove(bellary); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Train_number,Train_name,Source_stn,Dest_stn,Arrival,Depart,halt,Su,Mo,Tu,We,Th,Fr,Sa,train_priority,platform")] bellary bellary) { if (ModelState.IsValid) { db.Entry(bellary).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bellary)); }
// GET: bellaries/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } bellary bellary = db.bellaries.Find(id); if (bellary == null) { return(HttpNotFound()); } return(View(bellary)); }