public ActionResult Edit(CarType cartype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cartype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(cartype);
 }
        public ActionResult Create(CarType cartype)
        {
            if (ModelState.IsValid)
            {
                db.CarType.Add(cartype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(cartype);
        }