0

I'm new to .net mvc 3. I was using PHP Symfony previously.

In this tutorial from the official website, the author used .sdf as example. http://beta.asp.net/mvc/tutorials/getting-started-with-mvc3/getting-started-with-mvc3-part4-cs

The schema in .sdf was autogenerated according to the Model class file.

My question, is it possible to do the same thing using Mysql?

Thanks :)

Bananakilo
  • 1,323
  • 3
  • 14
  • 20
  • or, in other words, does MySQL support EF 4.1? [Old question here](http://stackoverflow.com/questions/76488/using-mysql-with-entity-framework) but doesn't mention 4.1. You might be able to do the same thing with NHibernate too. – Rup Nov 07 '11 at 16:01

1 Answers1

2

This should work (have never used ef code first with mySql) as long as you have the .net connector for MySql. You can grab it here: http://dev.mysql.com/downloads/connector/net/ You can also try this alternative connector from DevArt: http://www.devart.com/dotconnect/mysql/

* EDIT * It seems that the DevArt connector will do the trick.

santiagoIT
  • 9,411
  • 6
  • 46
  • 57
  • 1
    or there's instructions for the MySQL connector [here](http://stackoverflow.com/questions/3283820/using-mysql-with-entity-framework-4-and-the-code-first-development-ctp/4924678#4924678) too. – Rup Nov 07 '11 at 16:32
  • Thanks :), looks like I have to create the schema myself. It doesn't auto generate – Bananakilo Nov 07 '11 at 17:19