Chapter 10 Connector/NET API Reference

Table of Contents

10.1 Microsoft.EntityFrameworkCore Namespace
10.2 MySql.Data.Entity Namespace
10.3 MySql.Data.EntityFrameworkCore Namespace
10.4 MySql.Data.MySqlClient Namespace
10.5 MySql.Data.MySqlClient.Authentication Namespace
10.6 MySql.Data.MySqlClient.Interceptors Namespace
10.7 MySql.Data.MySqlClient.Memcached Namespace
10.8 MySql.Data.MySqlClient.Replication Namespace
10.9 MySql.Data.Types Namespace
10.10 MySql.Web Namespace

This section contains a high-level reference to the MySQL Connector/NET ADO.NET and .NET Core components. The complete reference is automatically generated from the embedded documentation.

10.1 Microsoft.EntityFrameworkCore Namespace

Enables access to .NET Core command-line interface (CLI) tools.

Classes

Class Description
MySQLDbContextOptionsExtensions Represents the context-option extensions implemented for MySQL.

10.2 MySql.Data.Entity Namespace

Classes

Class Description
BackoffAlgorithm Represents the base class for backoff algorithms.
BackoffAlgorithmErr1040 Backoff algorithm customized for the MySQL error code 1040 - Too many connections.
BackoffAlgorithmErr1205 Backoff algorithm customized for the MySQL error code 1205 - Lock wait timeout exceeded; try restarting transaction.
BackoffAlgorithmErr1213 Backoff algorithm customized for MySQL error code 1213 - Deadlock found when trying to get lock; try restarting transaction.
BackoffAlgorithmErr1614 Backoff algorithm for the MySQL error code 1614 - Transaction branch was rolled back: deadlock was detected.
BackoffAlgorithmErr2006 Backoff algorithm customized for MySQL error code 2006 - MySQL server has gone away.
BackoffAlgorithmErr2013 Backoff algorithm customized for MySQL error code 2013 - Lost connection to MySQL server during query.
BackoffAlgorithmNdb Backoff algorithm customized for MySQL Cluster (NDB) errors.
MySqlConnectionFactory Used for creating connections in Code First 4.3.
MySqlDependencyResolver Class used to resolve implementation of services.
MySqlEFConfiguration Class used to define the MySQL services used in Entity Framework.
MySqlExecutionStrategy Provided an execution strategy tailored for handling MySQL server transient errors.
MySqlHistoryContext Class used by code first migrations to read and write migration history from the database.
MySqlLogger Provides the logger class for use with Entity Framework.
MySqlManifestTokenResolver Represents a service for getting a provider manifest token given a connection.
MySqlMigrationCodeGenerator Class used to customized code generation to avoid the dbo. prefix added on table names.
MySqlMigrationSqlGenerator Implements the MySQL SQL generator for EF 4.3 data migrations.
MySqlModelCacheKey Represents a key value that uniquely identifies an Entity Framework model that has been loaded into memory.
MySqlProviderFactoryResolver Represents a service for obtaining the correct MySQL DbProviderFactory from a connection.
MySqlProviderInvariantName Defines the MySQL provider name.

Enumerations

Enumeration Description
OpType Represents a set of database operations.

10.3 MySql.Data.EntityFrameworkCore Namespace

Namespaces in this section:

MySql.Data.EntityFrameworkCore.DataAnnotations Namespace

Classes

Class Description
MySqlCharsetAttribute Establishes the character set of an entity property.
MySqlCollationAttribute Sets the collation in an entity property.

MySql.Data.EntityFrameworkCore.Extensions Namespace

Classes

Class Description
MySQLPropertyBuilderExtensions Represents the implementation of MySQL property-builder extensions used in Fluent API.
MySQLServiceCollectionExtensions MySQL extension class for IServiceCollection.

MySql.Data.EntityFrameworkCore.Infraestructure Namespace

Classes

Class Description
MySQLDbContextOptionsBuilder Represents the RelationalDbContextOptionsBuilder type implemented for MySQL.
MySQLOptionsExtension Represents the RelationalOptionsExtension type implemented for MySQL.

10.4 MySql.Data.MySqlClient Namespace

Classes

Class Description
AuthenticationPluginConfigurationElement Retrieves the authentication plugin configuration from the configuration file.
BaseCommandInterceptor Provides a means of enhancing or replacing SQL commands through the connection string rather than recompiling.
BaseTableCache Provides a base class used for the table cache.
GenericConfigurationElementCollection<T> Retrieves an element collection from the configuration file.
InterceptorConfigurationElement Class used in the configuration file to get configuration details for interceptors.
MySqlBulkLoader Load many rows into the database.
MySqlClientFactory Represents the DBProviderFactory implementation for MySqlClient.
MySqlClientPermission Derived from the .NET DBDataPermission class. For usage information, see Section 5.19, “Working with Partial Trust / Medium Trust”.
MySqlClientPermissionAttribute Associates a security action with a custom security attribute.
MySqlCommand Represents an SQL statement to execute against a MySQL database. This class cannot be inherited.
MySqlCommandBuilder Automatically generates single-table commands used to reconcile changes made to a data set with the associated MySQL database. This class cannot be inherited.
MySqlConfiguration Defines a configuration section that contains the information specific to MySQL.
MySqlConnection Represents an open connection to a MySQL Server database. This class cannot be inherited.
MySqlConnectionStringBuilder Defines all of the connection string options that can be used.
MySqlDataAdapter Represents a set of data commands and a database connection that are used to fill a data set and update a MySQL database. This class cannot be inherited.
MySqlDataReader Provides a means of reading a forward-only stream of rows from a MySQL database. This class cannot be inherited.
MySqlError Collection of error codes that can be returned by the server
MySqlException The exception that is thrown when MySQL returns an error. This class cannot be inherited.
MySqlHelper Helper class that makes it easier to work with the provider.
MySqlInfoMessageEventArgs Provides data for the InfoMessage event. This class cannot be inherited.
MySqlParameter Represents a parameter to a MySql.Data.MySqlClient.MySqlCommand, and optionally, its mapping to columns in a dataset. This class cannot be inherited.
MySqlParameterCollection Represents a collection of parameters relevant to a MySql.Data.MySqlClient.MySqlCommand as well as their respective mappings to columns in a dataset. This class cannot be inherited.
MySqlProviderServices The factory for building command definitions.
MySqlRowUpdatedEventArgs Provides data for the RowUpdated event. This class cannot be inherited.
MySqlRowUpdatingEventArgs Provides data for the RowUpdating event. This class cannot be inherited.
MySqlSchemaCollection Contains information about a schema.
MySqlSchemaRow Represents a row within a schema.
MySqlScript Provides a class capable of executing a SQL script containing multiple SQL statements including CREATE PROCEDURE statements that require changing the delimiter.
MySqlScriptErrorEventArgs Provides an error event argument used in MySqlScript.
MySqlScriptEventArgs Provides an event argument used in MySqlScript.
MySqlScriptServices Creates the script used to build an Entity Framework model.
MySqlSecurityPermission Creates permission sets.
MySqlTrace Logs events in a defined listener.
MySqlTransaction Represents an SQL transaction to be made in a MySQL database. This class cannot be inherited.
ReplicationConfigurationElement Defines a replication configuration element in the configuration file.
ReplicationServerConfigurationElement Defines a replication server in the configuration file.
ReplicationServerGroupConfigurationElement Defines a replication server group in the configuration file
SchemaColumn Represents a column object within a schema.

Delegates

Delegate Description
MySqlInfoMessageEventHandler Represents the method to handle the InfoMessage event of a MySqlConnection.
MySqlRowUpdatedEventHandler Represents the method to handle the RowUpdatedevent of a MySqlDataAdapter.
MySqlRowUpdatingEventHandler Represents the method to handle the RowUpdatingevent of a MySqlDataAdapter.
MySqlScriptErrorEventHandler Represents the method to handle an error in MySqlScript.
MySqlStatementExecutedEventHandler Represents the method to be called after the execution of a statement in MySqlScript.

Enumerations

Enumeration Description
MySqlBulkLoaderConflictOption Defines the action to perform when a conflict is found.
MySqlBulkLoaderPriority Defines the load priority.
MySqlCertificateStoreLocation Defines the certificate store location.
MySqlConnectionProtocol Specifies the type of connection to use.
MySqlDbType Specifies the MySQL data type of a field or property for use in a MySql.Data.MySqlClient.MySqlParameter.
MySqlDriverType Specifies the connection types that are supported.
MySqlErrorCode Provides a reference to error codes returned by MySQL.
MySqlSslMode Provides the SSL options for a connection.
MySqlTraceEventType Defines the log event type in MySqlTrace.
UsageAdvisorWarningFlags Defines the usage advisor warning type.

10.5 MySql.Data.MySqlClient.Authentication Namespace

Classes

Class Description
CachingSha2AuthenticationPlugin The implementation of the caching_sha2_password authentication plugin.
MySqlAuthenticationPlugin Abstract class used to define an authentication plugin.
MySqlNativePasswordPlugin Implements the mysql_native_password authentication plugin.
Sha256AuthenticationPlugin Implements the sha256_password authentication plugin.

Structures

Structure Description
SecBuffer Defines a security buffer.
SecHandle Defines a security handler.
SecPkgContext_Sizes Defines a security package context size.
SECURITY_HANDLE Defines a security handler.
SECURITY_INTEGER Defines a security integer value.

Enumerations

Enumeration Description
SecBufferType Defines a security buffer type.

10.6 MySql.Data.MySqlClient.Interceptors Namespace

Classes

Class Description
BaseExceptionInterceptor Represents the base class for all user-defined exception interceptors.

10.7 MySql.Data.MySqlClient.Memcached Namespace

The MySql.Data.MySqlClient.Memcached namespace contains members for binary and text memcached clients.

Classes

Class Description
BinaryClient Implements the memcached binary client protocol.
Client Represents an abstract interface to the client memcached protocol.
MemcachedException Provides the base class for all memcached exceptions.
TextClient Implements the memcached text client protocol.

Enumerations

Enumeration Description
MemcachedFlags Represents a set of flags used for requesting new connections instances.

10.8 MySql.Data.MySqlClient.Replication Namespace

The MySql.Data.MySqlClient.Replication namespace contains members for replication and load-balancing components.

Classes

Class Description
ReplicationRoundRobinServerGroup Class that implements round-robin load balancing.
ReplicationServer Represents a server in the replication environment.
ReplicationServerGroup Base class used to implement load-balancing features.

10.9 MySql.Data.Types Namespace

The MySql.Data.Types namespace contains members for converting MySQL types.

Classes

Class Description
MySqlConversionException Represents exceptions returned during the conversion of MySQL types.

Structures

Structure Description
MySqlDateTime Defines operations that apply to MySqlDateTime objects.
MySqlDecimal Defines operations that apply to MySqlDecimal objects.
MySqlGeometry Defines operations that apply to MySqlGeometry objects.

10.10 MySql.Web Namespace

The MySql.Web namespace includes a set of subordinate namespaces that represent the features managed by various MySQL providers and available for use within ASP.NET applications.

Namespaces in this section:

MySql.Web.Common Namespace

Classes

Class Description
SchemaManager Manages schema-related operations.

MySql.Web.Personalization Namespace

Classes

Class Description
MySqlPersonalizationProvider Implements a personalization provider enabling the use of web parts at ASP.NET websites.

MySql.Web.Profile Namespace

Classes

Class Description
MySQLProfileProvider Implements a profile provider for the MySQL database.

MySql.Web.Security Namespace

Classes

Class Description
MySQLMembershipProvider Manages storage of membership information for an ASP.NET application in a MySQL database.
MySQLRoleProvider Manages storage of role membership information for an ASP.NET application in a MySQL database.
MySqlSimpleMembershipProvider Provides support for website membership tasks, such as creating accounts, deleting accounts, and managing passwords.
MySqlSimpleRoleProvider Provides basic role-management functionality.
MySqlWebSecurity Provides security and authentication features for ASP.NET Web Pages applications, including the ability to create user accounts, log users in and out, reset or change passwords, and perform related tasks.

MySql.Web.SessionState Namespace

Classes

Class Description
MySqlSessionStateStore Enables ASP.NET applications to store and manage session state information in a MySQL database. Expired session data is periodically deleted from the database.

MySql.Web.SiteMap Namespace

Classes

Class Description
MySqlSiteMapProvider Implements a site-map provider for the MySQL database.