public static void Add(notification_tbl notification) { try { using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities()) { db.notification_tbl.Add(notification); db.SaveChanges(); } } catch (Exception e) { } }
public static int Add(notification_tbl notification) { try { using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities()) { db.notification_tbl.Add(notification); db.SaveChanges(); return(notification.id); } return(-1); } catch (Exception e) { throw e; } }