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