Skip to main content
.NETFramework4.6.1.NETStandard2.0

NHibernate driver for MySQL/MariaDB using MySqlConnector.

Published
Oct 6, 2022
4y ago
Total Downloads
363.7K
363,682

Install

dotnet add package NHibernate.Driver.MySqlConnector --version 2.0.4-ci.2
ProductVersions
.NET Standard
netstandard2.0
Other
.NETFramework4.6.1

README

NHibernate.MySqlConnector

This package provides an alternative MySQL/MariaDB driver for NHibernate in addition to NHibernate.Driver.MySqlDataDriver provided by nhibernate-core.

It uses the MySqlConnector library which is an alternative to MySql.Data that may be more performant in both async and sync workloads and fixes dozens of outstanding bugs in MySql.Data.

Usage

Set connection.driver_class in your NHibernate session factory config to:

  • connection.driver_class: NHibernate.Driver.MySqlConnector.MySqlConnectorDriver, NHibernate.Driver.MySqlConnector

or use the Configure-by-code helper:

  • new Configuration().DataBaseIntegration(c => c.MySqlConnectorDriver());

Values of the other parameters should stay the same as when using MySql.Data:

  • connection.provider: NHibernate.Connection.DriverConnectionProvider

  • dialect: One of the available MySQL dialects e.g. NHibernate.Dialect.MySQL5Dialect

Changes from Previous Version

No structural changes between v2.0.4-ci.1 and v2.0.4-ci.2.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.