コード例 #1
0
        public ActionResult Create(EventSession model)
        {
            try
            {
                _eventSessionService.InsertOrUpdate(model);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
コード例 #2
0
        public ActionResult Delete(int id, EventSession model)
        {
            try
            {
                var item = _eventSessionService.GetAll(a => a.Id == id).First();

                _eventSessionService.Purge(item);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }