public ActionResult Create(Notification notification) { if (ModelState.IsValid) { notification.CreateDate = DateTime.UtcNow; _notificationTasks.Save(notification); return RedirectToAction("Index"); } else { return View(); } }
// // GET: /Notifications/Create public ActionResult Create() { var notification = new Notification {CreateDate = DateTime.UtcNow}; return View(notification); }
public void Save(Notification notification) { _notificationRepository.SaveOrUpdate(notification); }
public ActionResult Edit(Notification notification) { if (ModelState.IsValid) { _notificationTasks.Save(notification); return RedirectToAction("Index"); } else { return View(); } }
public void Delete(Notification notification) { _notificationRepository.Delete(notification); }