public ActionResult CreateUpdate(int id = 0)
        {
            Route route = db.Route.Find(id); //Retrieve route
            if (route == null) route = new Route(); //Create a new route if none retrieved
            IEnumerable<RouteWayPoint> routeWayPoint = from rwp in db.RouteWayPoint
                                                       where rwp.RouteId == id
                                                       select rwp;

            RouteView routeView = new RouteView(route); //, routeWayPoint, Json(routeWayPoint));
            return View(routeView);
        }
 public ActionResult SetRoute()
 {
     RouteView routeView = new RouteView();
         return View(routeView);
 }
        //Create or update route
        public ActionResult CreateUpdateOld(int id = 0)
        {
            //Simple route with 2 points
            //Route route = db.Route.Find(id);
            //if (route == null ) route = new Route();
            //return View(route);

            Route route = db.Route.Find(id); //Retrieve route
            if (route == null) route = new Route(); //Create a new route if none retrieved
            IEnumerable<RouteWayPoint> routeWayPoint = from rwp in db.RouteWayPoint
                                                       where rwp.RouteId == id
                                                       select rwp;
            JsonResult a = Json(routeWayPoint);

            //if (routeWayPoint == null) routeWayPoint = new RouteWayPoint(); //Create new way points if none retrieved

            RouteView routeView = new RouteView(route); //, routeWayPoint, Json(routeWayPoint));
            return View(routeView);
        }