Ejemplo n.º 1
0
 public ActionResult Edit(Theme theme)
 {
     if (ModelState.IsValid)
     {
         context.Entry(theme).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index","Home");
     }
     return View(theme);
 }
Ejemplo n.º 2
0
        public ActionResult Create(Theme theme)
        {
            if (ModelState.IsValid)
            {
                context.Themes.Add(theme);
                context.SaveChanges();
                return RedirectToAction("Index","Home");
            }

            return View(theme);
        }