Develop App Based On MySQL Using C#

2011-09-14


Most of .net developers develop Windows applications using SQL Server database, but how about some cases that use MySQL?

Microsoft has announced that they no more provider API or connector or related library to connect the 3rd party database such as Oracle, MySQL, the reason is that most of 3rd party companies have already provided their own API and connectors, for example, Oracle have their own Oracle Data Provider for .NET (ODP.NET) instead of Microsoft OracleClient library; Also, MySQL provides their own API and connectors for different languages here.

Here we choose MySQL connector / Net and install, After installation, you can check the folders as the following:

The file contains the following directories:
Assemblies: A collection of DLLs that make up the connector functionality.
Docs: Connector/Net documentation in CHM format.
Samples: Sample code and applications that use the Connector/Net component.
VisualStudio: Resources used by the Visual Studio plugin.

After you install, the folder Assemblies is the most important since the dll library files are all under this folder:

mysqlDev00

Normally, when you develop a .NET application , you should add dll files such as MySql.Data.dll  as a Reference to your project.

Here we can consider LINQ tech:

Please follow MySQL’s official tutorials:

1: Tutorial: Using an Entity Framework Entity as a Windows Forms Data Source;

2: Databinding in ASP.NET using LINQ on Entities;