public void button1_Click(object sender, EventArgs e) { DbEntityUrunEntities db = new DbEntityUrunEntities(); var sorgu = from x in db.TBLADMIN where x.kullanıcı == textBox1.Text && x.sıfre == textbox2.text select x; if (sorgu.any()) { ; } { FrmAnaForm fr = new FrmAnaForm(); fr.Show(); this.hide(); }