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