Beispiel #1
0
 // veri güncelleme
 private void button3_Click(object sender, EventArgs e)
 {
     testEntities entityNesne = new testEntities();
     var duzenlenecekKayit = entityNesne.Tablo1.Where(p => p.id == 3).First();
     duzenlenecekKayit.ad = "hasan";
     entityNesne.SaveChanges();
 }
Beispiel #2
0
 // veri silme
 private void button4_Click(object sender, EventArgs e)
 {
     testEntities entityNesne = new testEntities();
     var silinecekKayit = entityNesne.Tablo1.Where(p => p.id == 3).First();
     entityNesne.DeleteObject(silinecekKayit);
     entityNesne.SaveChanges();
 }
Beispiel #3
0
        // veri kaydetme
        private void button2_Click(object sender, EventArgs e)
        {
            testEntities entityNesne = new testEntities();

            Tablo1 tablo1Nesne = new Tablo1();
            tablo1Nesne.id = 5;
            tablo1Nesne.ad = "cehars";
            tablo1Nesne.yas = 50;

            entityNesne.AddToTablo1(tablo1Nesne);
            entityNesne.SaveChanges();
        }