Esempio n. 1
0
 public ActionResult Edit(Events events)
 {
     if (ModelState.IsValid)
     {
         db.Entry(events).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(events);
 }
Esempio n. 2
0
        public ActionResult Create(Events events)
        {
            if (ModelState.IsValid)
            {
                db.Events1.Add(events);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(events);
        }