public ActionResult RequestRide(PassengersViewModel model)
        {
            if (ModelState.IsValid)
            {
                User user = System.Web.HttpContext.Current.GetOwinContext()
                            .GetUserManager <ApplicationUserManager>()
                            .FindById(System.Web.HttpContext.Current.User.Identity.GetUserId());

                Passenger passenger = _passengerRepository.GetPassengerByUser(user.Id);


                Payment payment = new Payment()
                {
                    PassengerId   = passenger.Id,
                    PaymentTypeId = _paymentTypeRepository.Find(p => p.Name == model.PaymentType).SingleOrDefault().Id,
                };
                //will be changed in the future for Debit and Credit Cards
                if (!model.PaymentType.Equals("Cash"))
                {
                    payment.Payed = true;
                }

                payment.Amount = model.Distance * _vehicleTypeRepository.Find(p => p.Name == model.VehicleType).SingleOrDefault().FareRate;

                Ride ride = new Ride()
                {
                    StartLocation = model.StartLocation,
                    EndLocation   = model.EndLocation,
                    PassengerId   = passenger.Id,
                    RideStatus    = RideStatus.NotAccepted,
                    Payment       = payment,
                    VehicleTypeId = _vehicleTypeRepository.Find(v => v.Name == model.VehicleType).SingleOrDefault().Id
                };

                _paymentRepository.Add(payment);
                _rideRepository.Add(ride);

                return(RedirectToAction("RideOnGoing"));
            }

            else
            {
                var VehicleTypesList = new List <SelectListItem>();
                var vehicleTypes     = _vehicleTypeRepository.GetAll();

                foreach (var vT in vehicleTypes)
                {
                    VehicleTypesList.Add(new SelectListItem()
                    {
                        Value = vT.Name, Text = vT.Name
                    });
                }

                ViewBag.VehicleTypes = VehicleTypesList;


                var PaymentTypesList = new List <SelectListItem>();
                var paymentTypes     = _paymentTypeRepository.GetAll();
                foreach (var pT in paymentTypes)
                {
                    PaymentTypesList.Add(new SelectListItem()
                    {
                        Value = pT.Name, Text = pT.Name
                    });
                }

                string Error = "";

                //add model error here

                ViewBag.PaymentTypes = PaymentTypesList;
                ModelState.AddModelError("", Error);
            }
            return(View(model));
        }