public ActionResult Create(Notification notification)
 {
     if (ModelState.IsValid)
     {
         // db.Notifications.Add(notification);
         // db.SaveChanges();
         // return RedirectToAction("Index");
         NotificationDAL dal = new NotificationDAL();
         dal.CreateNotification(notification);
         return RedirectToAction("Index");
     }
     return View(notification);
 }
 public Notification EditNotification(Notification notification)
 {
     db.Entry(notification).State = EntityState.Modified;
        db.SaveChanges();
        return null;
 }
        public ActionResult Edit(Notification notification)
        {
            if (ModelState.IsValid)
            {
                db.Entry(notification).State = EntityState.Modified;
                //db.SaveChanges();
                //return RedirectToAction("Index");

                NotificationDAL dal = new NotificationDAL();
                dal.EditNotification(notification);
                return RedirectToAction("Index");
            }
            return View(notification);
        }
 public Notification CreateNotification(Notification notification)
 {
     db.Notifications.Add(notification);
        db.SaveChanges();
        return null;
 }