Ejemplo n.º 1
0
        public ActionResult Create([Bind(Include = "Id,nombre,precio,categoria")] hotelr hotelr)
        {
            if (ModelState.IsValid)
            {
                db.hotelrs.Add(hotelr);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hotelr));
        }
        public ActionResult Create([Bind(Include = "Id,Nombre,Compania,Empleados")] Prueba prueba)
        {
            if (ModelState.IsValid)
            {
                db.Pruebas.Add(prueba);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(prueba));
        }