Click here to Skip to main content
15,559,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have configured all necessary to connect with MySQL with Entity Framwork in Visual Studio 2012

And all this is going well,

I get the mapping of my table in my code,

here is my code:

using (testuserEntities context = new testuserEntities())
               personels nam = context.personels.FirstOrDefault(x => == "Walid");
               if (nam !=null )
                   textBox1.Text =;

In the execution, I get the ERROR:[^]

What I have tried:

Connection Entity Framework with MySQL C #
Updated 22-Sep-16 5:55am
David_Wimbley 22-Sep-16 9:15am    
Can you post your app.config?
[no name] 22-Sep-16 9:25am    
Post the actual error. Not everyone can view an image stored somewhere. And it doesn't help people in the future.

I find the solution: We must update the DLL:

1) Right click on the Solution (top level in the solution explorer)

2) Manage Nuget packages for solution

3) Go to update ( locate in the left)

4) Update the packages :MySql.Data, MySql.Data.Entities, Entity.Framwork

we have change in the App.config file:


It works for me !!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900