Ejemplo n.º 1
0
 public ActionResult Edit(TheNew thenew)
 {
     if (ModelState.IsValid)
     {
         db.Entry(thenew).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(thenew);
 }
Ejemplo n.º 2
0
        public ActionResult Create(TheNew thenew)
        {
            if (ModelState.IsValid)
            {
                db.TheNew.Add(thenew);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(thenew);
        }