public bool UpdateNCC(DGNCCModel m) { try { tbl = db.tbl_DG_NCC.Find(m.Id); tbl.Ma_NCC = m.Ma_NCC; db.SaveChanges(); return(true); } catch { return(false); } }
public bool DeleteNCC(int Id) { try { tbl = db.tbl_DG_NCC.Find(Id); db.tbl_DG_NCC.Remove(tbl); db.SaveChanges(); return(true); } catch { return(false); } }
public DeXuatNCCDao() { db = new EFDbContext(); tbl = new tbl_DG_NCC(); }