Exemplo n.º 1
0
 public void Update(Kh obj)
 {
     using (var db = new QLBH_WinDBContext())
     {
         db.Khs.Attach(obj);
         db.Entry(obj).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public Kh Insert(Kh obj)
 {
     using (var db = new QLBH_WinDBContext())
     {
         db.Khs.Add(obj);
         db.SaveChanges();
         return(obj);
     }
 }
Exemplo n.º 3
0
 public void Delete(Kh obj)
 {
     using (var db = new QLBH_WinDBContext())
     {
         db.Khs.Attach(obj);
         db.Khs.Remove(obj);
         db.SaveChanges();
     }
 }
 partial void DeleteKh(Kh instance);
 partial void UpdateKh(Kh instance);
 partial void InsertKh(Kh instance);