I am following this guide: http://www.asp.net/entity-framework/tutorials/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
So that is MVC3 with EF Code First and I am trying to use MySQL instead of SQLSERVER.
So far I have downloaded the MySqlConnector/Net (and also Devart dotConnect). In my web.config I have added the following under
<add name="ProjectContext"
connectionString="Server=localhost; Database=project; Uid=root; Pwd=pass;"
providerName="MySql.Data.MySqlClient"/>
Next, I found out that the following also has to be added to the web.config. I don't know why though.
<DbProviderFactories>
<clear/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
I have a simple POCO model for a post called Post. I am under the impression that when this compiles, and the lazy loading kicks in, the entity framework should create a table for me that's called 'post' (or 'posts').
However, when this runs, I get the following error: "Table 'project.posts' doesn't exist" indicating that the EF does NOT create this for me.
When I use the dotConnect instead, I get the another error: "Unknown database 'dbo'".
Does anyone have some insight as to what's going on?