public ActionResult DeleteConfirmed(int id) { Bus_details bus_details = db.details.Find(id); db.details.Remove(bus_details); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,busNumber,bStopNumber,busAddress,busStopLocation,latitude,longitude,heading")] Bus_details bus_details) { if (ModelState.IsValid) { db.Entry(bus_details).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bus_details)); }
public ActionResult Create([Bind(Include = "ID,busNumber,bStopNumber,busAddress,busStopLocation,latitude,longitude,heading")] Bus_details bus_details) { if (ModelState.IsValid) { db.details.Add(bus_details); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bus_details)); }
// GET: Bus_details/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Bus_details bus_details = db.details.Find(id); if (bus_details == null) { return(HttpNotFound()); } return(View(bus_details)); }