public ActionResult Alterar(Bairro bairro)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bairro).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bairro));
 }
 public ActionResult Edit([Bind(Include = "ID,Descripcion,estado,descuento")] Promociones promociones)
 {
     if (ModelState.IsValid)
     {
         db.Entry(promociones).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(promociones));
 }
        public ActionResult Alterar(Genero genero)
        {
            if (ModelState.IsValid)
            {
                db.Entry(genero).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(genero);

        }
 public ActionResult Alterar(Restaurante restaurante)
 {
     if (ModelState.IsValid)
     {
         db.Entry(restaurante).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IDBairro = new SelectList(db.Bairro, "IDBairro", "Nome", restaurante.IDBairro);
     ViewBag.IDGenero = new SelectList(db.Genero, "IDGenero", "Descricao", restaurante.IDGenero);
     return(View(restaurante));
 }