public ActionResult DeleteConfirmed(int id) { kuruduvadi kuruduvadi = db.kuruduvadis.Find(id); db.kuruduvadis.Remove(kuruduvadi); 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")] kuruduvadi kuruduvadi) { if (ModelState.IsValid) { db.Entry(kuruduvadi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kuruduvadi)); }
// GET: kuruduvadis/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } kuruduvadi kuruduvadi = db.kuruduvadis.Find(id); if (kuruduvadi == null) { return(HttpNotFound()); } return(View(kuruduvadi)); }