Beispiel #1
0
 public static void RemoveUserNotification(user_notification_tbl u)
 {
     using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities())
     {
         //db.user_notification_tbl.Remove(u);
         db.Entry(u).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
Beispiel #2
0
        public static void Add(user_notification_tbl notification)
        {
            try
            {
                using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities())
                {
                    db.user_notification_tbl.Add(notification);
                    db.SaveChanges();
                }
            }

            catch (Exception e)
            {
                throw e;
            }
        }