// GET: Cars/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Cars cars = db.Cars.Find(id);

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

            if (cars == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CarTypeId = new SelectList(db.CarType, "Id", "Type", cars.CarTypeId);
            cars.Photo        = StaticGlobalHelpers.ImageToString(cars.Photo);
            return(View(cars));
        }