Click here to Skip to main content
15,441,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
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 => x.name == "Walid");
               if (nam !=null )
               {
                   textBox1.Text = nam.name;
               }
           }


In the execution, I get the ERROR:

http://i.stack.imgur.com/UrZWO.png[^]

What I have tried:

Connection Entity Framework with MySQL C #
Posted
Updated 22-Sep-16 4:55am
v5
Comments
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:

XML




It works for me !!
 
Share this answer
 
v2

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