I recently started working with Entity Framework in Visual studio.
I really love it, and how it creates the SQL database for me.
The only thing that i cannot get to work is connecting to and setting up a MySQL database. I saw that since the Connector/net 6.5.5
, there's some Visual Studio integration with EF, but i cannot seem to find out what exactly.
What's the best practice to use EF
with MySQL
?
Asked
Active
Viewed 168 times
0

spajce
- 7,044
- 5
- 29
- 44

Marcovannoord
- 323
- 3
- 10
-
I've got [a blog post](http://brice-lambson.blogspot.com/2012/10/entity-framework-on-mysql.html) about that... – bricelam Feb 21 '13 at 23:57
-
Hmm, it doesn't seem that it also creates the database for me, or am i wrong? – Marcovannoord Feb 23 '13 at 19:00
-
I can't remember off the top of my head. Does your user have permissions to create databases? If so, then the provider may not support it. – bricelam Feb 25 '13 at 16:58
-
I'm connecting to localhost with a root account, so that shouldn't be problem. But what do you mean by provider may not support it? the Connector/net does not support creating databases? – Marcovannoord Feb 26 '13 at 11:17
-
It looks like versions 6.3.5 and newer can create databases. Are you getting any error messages? – bricelam Feb 26 '13 at 16:57
-
Have you read... http://stackoverflow.com/questions/3283820/using-mysql-with-entity-framework-4-and-the-code-first-development-ctp – Paul Zahra Mar 04 '13 at 12:49
-
That was the solution. I read Brice's blog post, which got me a lot further, but i kept getting a "version string too short or too long" error. I put the information from the question from Paul in my app.config, and that solved it :) . – Marcovannoord Mar 14 '13 at 16:01