public ActionResult Create(Material material)
        {
            if (ModelState.IsValid)
            {
                db.Material.Add(material);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ID_TipoMaterial = new SelectList(db.TipoMaterial, "ID_TipoMaterial", "Nombre", material.ID_TipoMaterial);
            return View(material);
        }
 public ActionResult Edit(Material material)
 {
     if (ModelState.IsValid)
     {
         db.Entry(material).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ID_TipoMaterial = new SelectList(db.TipoMaterial, "ID_TipoMaterial", "Nombre", material.ID_TipoMaterial);
     return View(material);
 }