Exemplo n.º 1
0
        public ActionResult Create(Series series)
        {
            if (ModelState.IsValid)
            {
                db.Series.Add(series);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(series);
        }
Exemplo n.º 2
0
 public ActionResult Edit(Series series)
 {
     if (ModelState.IsValid)
     {
         db.Entry(series).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(series);
 }