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(); } }
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(); } }
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(); } }
// öğ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(); } }
// Öğ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(); } }