开发者

Mysql - Visual Web Developer - Entity Framework

I'm having the following problem.

I have Visual Web Developer 2010 Express and I'm trying to get it to work with the Entity Framework and a MySQL database.

I have the .NET Connector for MySql installed, but it doesn't seem to integrate with Web Developer, as it does with Visual Studio 2010 (professional edition). The wizard for creating the AD开发者_开发技巧O.NET Entity Data Model asks me for the data to connect to the database, but I can't choose the MySql driver, so I can't create a connection, so in short, I can't continue.

Things I've tried so far:

1) I have referenced MySql.Data, MySql.Web and MySql.Data.Entity in my project, but to no avail.

2) I have manually created a connection string in my Web.config like so:

<connectionStrings>
  <add name="modelEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=MySql.Data.MySqlClient; provider connection string='server=localhost;User Id=simply; database=simply;password=simply'" providerName="System.Data.EntityClient"/
</connectionStrings>

At the same time, I have also added following code:

<system.data>
    <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>
</system.data>

3) I have changed the previous connection string into a normal connection string like so:

<add name="connection" connectionString="server=localhost;database=simply;uid=simply;password=simply" providerName="System.Data.EntityClient"/>

4) I have added following code to my machine.config (and rebooted the computer):

<DbProviderFactories>
  <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>

All of this has been to no avail so far. Can anyone point me in the right direction and explain to me how I'm supposed to get my Entity Framework with MySql up and running?

Thanks a lot for any help you guys can give me.


This is the designed behaviour - VS does not allow 3rd party extensibility in Express versions.
We have provided some piece of advice here at our forum.
You can try to achieve the same results using edmgen as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜