I added Entity Framework to my project but I call the toList()
method and I'm getting an error:
okuldbEntities ent = new okuldbEntities();
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.DataSource = ent.ogrenciler.ToList();
}
and this is the error:
This exception was originally thrown at this call stack: [External
Code]
Inner Exception 1: MySqlException: Table
'okuldb.okuldb.ogrenciler' doesn't exist
okuldb
is my database name and I didn't find why it added it twice.
I looked a lot. I installed VMWare did it all again, but got the same result.
my steps:
- i download visual studio 2019 community and install it
- mysql installer and i install mysql server 8.0.22, visual studio connector 1.2.9 and .net connector 8.0.22
- i create c# project netframework 4.8
- after this i go nuget package and i install entity framework 6.4.4 and mysql data entityframework 8.0.22 and mysql data 8.0.22
- after all this i can add entity my project.
i add datagridview1 and i write this code:
eokulEntities ent = new eokulEntities();
private void Form1_Load(object sender, EventArgs e)
{
dataGridView1.DataSource = ent.ogrencinot.ToList();
}
and i runnig and i see this message:
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
MySqlException: Table 'eokul.eokul.ogrencinot' doesn't exist
i try too much way. i found another laptop i format it and i install again all this.
and again same error.
really what can i do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…