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