Unable to retrieve metadata for 'MvcStore.Models.Customer'. Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used.
Web.config
<connectionStrings>
<add name="StoreContext" connectionString="Server=127.0.0.1; port=3306; Database=webmvcstore; Uid=root; Pwd=root;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
Context
public class StoreContext : DbContext
{
public DbSet<Customer> Customers { get; set; }
}
Entity
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
}
DLLs
Mysql.Data, Mysql.Data.Entity, Mysql.Data.Web
.NET Framework 4.5
Visual Studio 2012
I don't know how to fix this. In VS 2010 with MVC 3 everything works.