Skip to content

nhibernate/NHibernate.MySqlConnector

Folders and files

NameName
Last commit message
Last commit date
Dec 3, 2024
Jul 8, 2024
Oct 4, 2022
Mar 21, 2024
Dec 4, 2024
Dec 4, 2024
Mar 27, 2020
Apr 18, 2020
Sep 9, 2022
Dec 3, 2024
Dec 3, 2024

Repository files navigation

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