MySQL Blog Archive
For the latest blogs go to
MySQL Connector/NET 8.0.20 has been released

Dear MySQL users,

MySQL Connector/NET 8.0.20 is the latest General Availability release of
the MySQL Connector/NET 8.0 series. This version supports .NET Core 3.1
and the X DevAPI, which enables application developers to write code
that combines the strengths of the relational and document models using
a modern, NoSQL-like syntax that does not assume previous experience
writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see For more
information about how the X DevAPI is implemented in Connector/NET, see
NuGet packages provide functionality at a project level. To get the
full set of features available in Connector/NET such as availability
in the GAC, integration with Visual Studio’s Entity Framework Designer
and integration with MySQL for Visual Studio, installation through
the MySQL Installer or the stand-alone MSI is required.

Please note that the X DevAPI requires at least MySQL Server version
8.0 or higher with the X Plugin enabled. For general documentation
about how to get started using MySQL as a document store, see

To download MySQL Connector/NET 8.0.20, see

Installation instructions can be found at

Changes in MySQL Connector/NET 8.0.20 (2020-04-27, General

    * Functionality Added or Changed

    * Bugs Fixed

Functionality Added or Changed

    * Connector/NET now supports Entity Framework Core 3.1.1 on
      all platforms with NET Standard 2.0 support. Microsoft
      Entity Framework Core 3.1.1 is not compatible with the
      previous versions of EF Core and those previous versions
      (2.1, 2.0, 1.1) are not supported by this release of
      Connector/NET (see Entity Framework Core Support
      In addition, the MySql.Data.EntityFrameworkCore.Design
      NuGet package is deprecated and the functionality
      provided by that package now is merged with the
      MySql.Data.EntityFrameworkCore package.

    * Connector/NET now provides compression of X Protocol
      payload data, which can be configured using the new
      Compression connection option. The option is set to
      preferred mode by default to compress the payload data if
      the MySQL server instance also supports compression. For
      a description of each option value, see Options for X
      Protocol Only

    * Document Store: Connector/NET now provides JSON schema
      validation for a collection to enforce a certain
      structure that documents must adhere to before they are
      permitted to be inserted or updated. Schema validation is
      performed by the server, which returns an error message
      if a document in a collection does not match the schema
      definition or if the server does not support validation.
      The existing Schema.CreateCollection method now is
      overloaded and can be used to pass a
      CreateCollectionOptions object with a schema definition
      to a MySQL server. The ReuseExistingObject parameter of
      the original method is set as an option within
      CreateCollectionOptions when using the new overloaded
      method. The level of enforcement (off or strict, strict
      by default) and schema definition are specified using the
      validation option, for example:
var collOptions = CreateCollectionOptions() {
    reuseExistingObject = false,
    validation = Validation() {
        level = ValidationLevel.Strict,
        schema = “{\”id\”: \“\”,”
                        + “\”$schema\”: \“ \”,”
                        +               ” \”description\”: \”A geographical coordinate\”, ”
                        +               ” \”type\”: \”object\”,”
                        +               ” \”properties\”: {”
                        +                    ” \”latitude\”: {”
                        +                         ” \”type\”: \”number\””
                        +                    ” },”
                        +                      ” \”longitude\”: {”
                        +                          ” \”type\”: \”number\””
                        +                     ” }”
                        +                ” },”
                        +                ” \”required\”: [\”latitude\”, \”longitude\”]”
                        +  ” }”

var coll = schema.CreateCollection(“longlang”, collOptions);
            In addition, a new method permits the schema validation
            of an existing collection to be reset. The
            Schema.ModifyCollection method passes a
            ModifyCollectionOptions object to the server. The
            validation collection option must include either a
             modified level value or schema value (or both), for
var collOptions = ModifyCollectionOptions() {
    validation = Validation() {
        level = ValidationLevel.Off

var coll = schema.ModifyCollection(“longlang”, collOptions);
           The ReuseExistingObject option is not supported for
           modifications and returns an error message if it is used.

Bugs Fixed

    * A connection made to a named server with multiple DNS
      entries pointing to different IP addresses for the same
      server generated an exception. Now, only the first
      element is returned when multiple elements are found.
      (Bug #30970949, Bug #97448)

    * The MySQL.Data NuGet package for Connector/NET 8.0.19
      included an unsigned version of Ubiety.Dns.Core.dll,
      which produced an exception when loaded. (Bug #30798305,
      Bug #98204)

    * Scaffolding a MySQL database with EF Core 3.0 was not
      implemented by Connector/NET and the connector returned
      an exception in response to its use. Support for EF Core
      3.1.1 in this release adds scaffolding capabilities. (Bug
      #30677382, Bug #98011)

    * The get_info method was not included in any of the Entity
      Framework Core versions (1.1, 2.0, and 2.1) that
      Connector/NET supported. Connector/NET now supports EF
      Core 3.1.1 and implements the
      sExtension.Internal.get_info method. (Bug #30347893, Bug

    * The MySqlDbType.JSON type when used as a parameter in a
      prepared statement produced code errors. Connector/NET
      now interprets MySqlDbType.JSON as MySqlDbType.VarChar.
      No code changes are required to specify a JSON column.
      (Bug #29959124, Bug #95984)

    * Blank spaces mixed with values in the IN() list of a
      SELECT statement generated an error. (Bug #29838254)

    * An attempt to read the record of a model class defined to
      correspond to a MySQL table with a property of type bool?
      (nullable Boolean), using the EF Core database context,
      returned an error message. (Bug #29833103, Bug #93028)

    * Access to the MySqlDataReader object was restricted when
      the parent MySqlCommand object was closed. This fix
      modifies MySqlCommand.Dispose() to no longer call the
      ResetReader method. (Bug #27441433, Bug #89159)

On Behalf of MySQL Release Engineering Team,
Tvarita Jain