public ActionResult DeleteConfirmed(int id)
        {
            trip_share_details trip_share_details = db.trip_share_details.Find(id);

            db.trip_share_details.Remove(trip_share_details);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id,trip_share_id,seats,start_at_date,start_at_time,from_lat,from_lng,from_plc,to_lat,to_lng,to_plc,gender_id,booked_seats,seat_cost,trip_direction,is_active")] trip_share_details trip_share_details)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trip_share_details).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.trip_share_id = new SelectList(db.trip_share, "id", "id", trip_share_details.trip_share_id);
     return(View(trip_share_details));
 }
        // GET: trip_share_details/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trip_share_details trip_share_details = db.trip_share_details.Find(id);

            if (trip_share_details == null)
            {
                return(HttpNotFound());
            }
            return(View(trip_share_details));
        }
        // GET: trip_share_details/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            trip_share_details trip_share_details = db.trip_share_details.Find(id);

            if (trip_share_details == null)
            {
                return(HttpNotFound());
            }
            ViewBag.trip_share_id = new SelectList(db.trip_share, "id", "id", trip_share_details.trip_share_id);
            return(View(trip_share_details));
        }