//
        // GET: /Ride/Create
        public ActionResult Create()
        {
            RideViewModel rideViewModel = new RideViewModel();

            IEnumerable<SelectListItem> selectList =
                from bikes in _bikeRepository.GetAll()
                select new SelectListItem
                {
                    Text = bikes.Name,
                    Value = bikes.Id.ToString()
                };

            rideViewModel.Bikes = selectList;

            return View(rideViewModel);
        }
        //
        // GET: /Ride/Edit/5
        public ActionResult Edit(int id = 0)
        {
            RideViewModel rideViewModel = new RideViewModel();
            rideViewModel.Ride = _rideRepository.GetById(id);

            IEnumerable<SelectListItem> selectList =
                from bikes in _bikeRepository.GetAll()
                select new SelectListItem
                {
                    Selected = (bikes.Id == rideViewModel.Ride.Bike.Id),
                    Text = bikes.Name,
                    Value = bikes.Id.ToString()
                };
            rideViewModel.Bikes = selectList;

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