MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: How to start using Entity Framework 6 with MySQL databases
Posted by: Edgar Knapp
Date: January 11, 2014 05:33PM

I am getting the identical error with VS 2013 Premium, MySQL Server 5.6.15, MySQL for VS 1.1.1, Connector.Net 6.8.3.

Using EF6, it does not matter what model you create. Just a single entity and a couple of fields will do. Upon "Generate Database from Model..." you get the above-mentioned NullReference Exception when the DDL is being generated.

Generating a model from an existing database works just fine, by the way.

Here is my app.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6">
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to start using Entity Framework 6 with MySQL databases
3645
January 11, 2014 05:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.