コード例 #1
0
 public void dvDel(ders_ver ders_)
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())   //Öğretmen silmek için ilişkili olduğu için bu tablodaki veriler de
     {                                                                   //silinir.
         var entity = context.Entry(ders_);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
コード例 #2
0
 public void Pointdel(points points) //Öğrencinin puan tablosunda kaydı var ise silinir
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(points);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
コード例 #3
0
 public void dadel(ders_al ders_Al) //Öğrenci bir derse kayıtlı ise bunlar silinir
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(ders_Al);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
コード例 #4
0
 // öğrenci silme *****************************************************************************************
 public void stddel(student student) //students delete
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(student);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
コード例 #5
0
        // Öğretmen silme *************************************************************************************************************************
        public void TSdel(teacher teacher)  //teacher delete
        {
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                //öğretmen silme

                var entity = context.Entry(teacher);
                entity.State = System.Data.Entity.EntityState.Deleted;
                context.SaveChanges();
            }
        }