MySQL Connector/NET functionality is available as packages from NuGet, an open-source package manager for the Microsoft development platform (including .NET Core). The NuGet Gallery is the central software package repository populated with the most recent NuGet packages for Connector/NET.
You can install or upgrade one or more individual Connector/NET packages with NuGet, making it a convenient way to introduce existing technology, such as Entity Framework, to your project. NuGet manages dependencies across the related packages and all of the prerequisites are listed in the NuGet Gallery. For a description of each Connector/NET package, see Connector/NET Packages (NuGet).
For projects that require Connector/NET assemblies to be stored in the GAC, integration with Entity Framework Designer (Visual Studio), or access to MySQL for Visual Studio, use MySQL Installer or the standalone MSI to install Connector/NET, rather than installing the NuGet packages.
The NuGet Gallery (https://www.nuget.org/) provides several client tools that can help you install or upgrade Connector/NET packages. If you are not familiar with the tool options or processes, see Package consumption workflow to get started. After locating a package description in NuGet, confirm the following information:
The identity and version number of the package are correct. Use the Version History list to select the current version.
All of the prerequisites are installed. See the Dependencies list for details.
The license terms are met. See the License Info link to view this information.
Connector/NET provides the following five NuGet packages:
This package contains the core functionality of Connector/NET, including using MySQL as a document store (with Connector/NET 8.0 only). It implements the required ADO.NET interfaces and integrates with ADO.NET-aware tools. In addition, the packages provides access to multiple versions of MySQL server and encapsulates database-specific protocols.
MySql.Webpackage includes support for the ASP.NET 2.0 provider model (see Section 6.2, “ASP.NET Provider Model and Tutorials”). This model enables you to focus on the business logic of your application, rather than having to recreate boilerplate items such as membership and roles support. The package supports the membership, role, profile, and session-state providers.
This package provides object-relational mapper (ORM) capabilities, which enables you to work with MySQL databases using domain-specific objects, thereby eliminating the need for most of the data access code. Select this package for your Entity Framework 6 applications (see Section 7.1, “Entity Framework 6 Support”).
This package is similar to the
MySql.Data.EntityFrameworkpackage; however, it provides multi-platform support for Entity Framework tasks. Select this package for your Entity Framework Core applications (see Section 7.2, “Entity Framework Core Support”).
MySql.Data.EntityFrameworkCore.Designpackage includes shared design-time components for Entity Framework Core tools, which enable you to scaffold and migrate MySQL databases.Note
Beginning with Connector/NET 8.0.20, the functionality provided in this package has been relocated to the
MySql.Data.EntityFrameworkCorepackage. The original
MySql.Data.EntityFrameworkCore.Designpackage is deprecated.