Ejemplo n.º 1
0
        // GET: Event
        public ActionResult Index()
        {
            Calumet      db     = dbio.db;
            List <Event> events = db.Events.ToList();

            return(View(events));
        }
Ejemplo n.º 2
0
 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));
 }