Example #1
0
        public ActionResult Create(Session session)
        {
            if (ModelState.IsValid)
            {
                ds.Create(session);
                return RedirectToAction("Index");
            }

            return View(session);
        }
Example #2
0
 // Method for updating sessions
 public void Update(Session item)
 {
     dc.Entry(item).State = EntityState.Modified;
     dc.SaveChanges();
 }
Example #3
0
 // Method for creating sessions
 public void Create(Session session)
 {
     dc.Sessions.Add(session);
     dc.SaveChanges();
 }