0

I have previously created an instance of a MySQL database as described in this question on Code Review. I have completed the database, and I’m ready to create the application using C# in Visual Studio 2015.

The only question I’ve found here on stackvoverflow.com that seems relevant is this one.

I have been using MySQL Documentation from these pages:

Environment is Windows 10, The regedit image shows the .net framework version. I upgraded MySQL to version 8.0.11 earlier this week. Package Manager Console: PM> get-package

Id Versions ProjectName
-- -------- -----------
EntityFramework {6.2.0} bkInventory2App
Google.Protobuf {3.5.1} bkInventory2App
MySql.Data {8.0.11} bkInventory2App
MySql.Data.EntityFramework {8.0.11} bkInventory2App

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.2" />
  </startup>
  <connectionStrings>
    <add name="MySQLBKLibInventory" providerName="MySql.Data.MySqlClient" connectionString="SERVER=localhost;DATABASE=pacswlibinvtool;UID=root;PASSWORD=******;" />
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, 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>

Dot Net Version
enter image description here

Add ADO.NET Class
enter image description here

Choose Model Contents enter image description here

Choose Data Connection
enter image description here

Choose Data Source
enter image description here

ODBC Data Administrator
enter image description here

Installed MySQL Applications
enter image description here

Database in MySQL WorkBench
enter image description here

pacmaninbw
  • 439
  • 1
  • 10
  • 22

1 Answers1

0

Please note in the second to last image, the one showing the installed MySQL Applications, that MySQL for Visual Studio is not installed. Installing MySQL Visual Studio corrected this particular configuration problem.

pacmaninbw
  • 439
  • 1
  • 10
  • 22