public ActionResult DeleteConfirmed(int id)
        {
            PlaneKind plane = db.Planes.Find(id);

            db.Planes.Remove(plane);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Name,KilometersHourSpeed")] PlaneKind plane)
 {
     if (ModelState.IsValid)
     {
         db.Entry(plane).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(plane));
 }
        public ActionResult Create([Bind(Include = "Id,Name,KilometersHourSpeed")] PlaneKind plane)
        {
            if (ModelState.IsValid)
            {
                db.Planes.Add(plane);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(plane));
        }
        // GET: Planes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PlaneKind plane = db.Planes.Find(id);

            if (plane == null)
            {
                return(HttpNotFound());
            }
            return(View(plane));
        }