Beispiel #1
0
        // GET: Car/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Car car = carManager.Find(x => x.Id == id.Value);

            if (car == null)
            {
                return(HttpNotFound());
            }

            var model = new CarDetailModel()
            {
                Car             = car,
                YakitTipleri    = LookupManager.GetLookups(LookupType.YakitTipi),
                VitesTipleri    = LookupManager.GetLookups(LookupType.VitesTipi),
                MarkaTipleri    = LookupManager.GetLookups(LookupType.Marka),
                KasaTipleri     = LookupManager.GetLookups(LookupType.KasaTipi),
                LocationTipleri = LookupManager.GetLookups(LookupType.Locations),
            };

            return(View(model));
        }