コード例 #1
0
 public bool CUD(Ogrenci o, EntityState state)
 {
     using (OBSEntities2 ogr = new OBSEntities2())
     {
         ogr.Entry(o).State = state;
         if (ogr.SaveChanges() > 0)
         {
             return(true);
         }
         return(false);
     }
 }
コード例 #2
0
 public bool OgretmenDersCUD(Ogretmen_Ogrenci_Ders od, EntityState state)
 {
     using (OBSEntities2 o = new OBSEntities2())
     {
         o.Entry(od).State = state;
         if (o.SaveChanges() > 0)
         {
             return(true);
         }
         return(false);
     }
 }
コード例 #3
0
 public bool DersCUD(Ders d, EntityState state)
 {
     using (OBSEntities2 o = new OBSEntities2())
     {
         o.Entry(d).State = state;
         if (o.SaveChanges() > 0)
         {
             return(true);
         }
         return(false);
     }
 }
コード例 #4
0
 public bool UserCUD(User u, EntityState state)
 {
     using (OBSEntities2 ogr = new OBSEntities2())
     {
         ogr.Entry(u).State = state;
         if (ogr.SaveChanges() > 0)
         {
             return(true);
         }
         return(false);
     }
 }