public ActionResult DeleteConfirmed(int id)
        {
            Carrocompras carrocompras = db.Carrocompras.Find(id);

            db.Carrocompras.Remove(carrocompras);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id")] Carrocompras carrocompras)
 {
     if (ModelState.IsValid)
     {
         db.Entry(carrocompras).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(carrocompras));
 }
        public ActionResult Create([Bind(Include = "Id")] Carrocompras carrocompras)
        {
            if (ModelState.IsValid)
            {
                db.Carrocompras.Add(carrocompras);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(carrocompras));
        }
        // GET: Carrocompras/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Carrocompras carrocompras = db.Carrocompras.Find(id);

            if (carrocompras == null)
            {
                return(HttpNotFound());
            }
            return(View(carrocompras));
        }