Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ID,Nombre_Continente")] T_Continente t_Continente)
 {
     if (ModelState.IsValid)
     {
         dbContext.Entry(t_Continente).State = EntityState.Modified;
         dbContext.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(t_Continente));
 }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "ID,Nombre_Continente")] T_Continente t_Continente)
        {
            if (ModelState.IsValid)
            {
                dbContext.T_Continente.Add(t_Continente);
                dbContext.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(t_Continente));
        }
Ejemplo n.º 3
0
        // GET: Continente/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_Continente t_Continente = dbContext.T_Continente.Find(id);

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