public static void UpdateStatus(fault_tbl fault) { try { using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities()) { db.Entry(fault).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } } catch { throw; } }
public static void Add(fault_tbl fault) { try { using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities()) { db.fault_tbl.Add(fault); db.SaveChanges(); } } catch { throw; } }