//
        // GET: /AddCartoon/Create

        public ActionResult Create()
        {
            var car = new CARTOONS();

            ViewBag.Statuses = db.DIC_CARTOON_STATUSES.ToList();
            return(View(car));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            CARTOONS car = db.CARTOONS.Find(id);

            db.CARTOONS.Remove(car);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit(CARTOONS car)
 {
     if (ModelState.IsValid)
     {
         db.Entry(car).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(car));
 }
        //
        // GET: /AddCartoon/Details/5

        public ActionResult Details(int id = 0)
        {
            CARTOONS car = db.CARTOONS.Find(id);

            if (car == null)
            {
                return(HttpNotFound());
            }
            return(View(car));
        }
        //
        // GET: /AddCartoon/Delete/5

        public ActionResult Delete(int id)
        {
            CARTOONS car = db.CARTOONS.Find(id);

            if (car == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CarName = car.CR_NAME;
            return(View(car));
        }
        public ActionResult Create(CARTOONS car)
        {
            if (ModelState.IsValid)
            {
                db.CARTOONS.Add(car);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(car));
        }