public ActionResult Create(Event model) { try { _eventService.InsertOrUpdate(model); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(int id, Event model) { try { var item = _eventService.GetAll(a => a.Id == id).FirstOrDefault(); _eventService.Purge(item); return RedirectToAction("Index"); } catch { return View(); } }