// GET: Event public ActionResult Index() { Calumet db = dbio.db; List <Event> events = db.Events.ToList(); return(View(events)); }
public ActionResult AddEvent(Event ev) { if (ModelState.IsValid) { Calumet db = dbio.db; db.Events.Add(ev); db.SaveChanges(); //Return back to the main page return(RedirectToAction("Index")); } return(View(ev)); }