public static void OgrenciKaydet(OgrenciModel ogrenci) { using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString())) { cnn.Execute("insert into Ogrenciler (OgrenciAD) values (@Ad) ", ogrenci); } }
private void button1_Click(object sender, EventArgs e) { OgrenciModel o = new OgrenciModel(); o.Ad = textBox1.Text; SqliteDataAccess.OgrenciKaydet(o); }