public ActionResult DeleteConfirmed(int id)
        {
            tblColecciones tblcolecciones = db.tblColecciones.Find(id);

            db.tblColecciones.Remove(tblcolecciones);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id_coleccion,nom_coleccion,desc_coleccion")] tblColecciones tblcolecciones)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblcolecciones).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblcolecciones));
 }
        public ActionResult Create([Bind(Include = "id_coleccion,nom_coleccion,desc_coleccion")] tblColecciones tblcolecciones)
        {
            if (ModelState.IsValid)
            {
                db.tblColecciones.Add(tblcolecciones);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tblcolecciones));
        }
        // GET: /Colecciones/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblColecciones tblcolecciones = db.tblColecciones.Find(id);

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