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