https://github.com/nhibernate/nhibernate.mysqlconnector
https://github.com/nhibernate/nhibernate.mysqlconnector
mysqlconnector nhibernate
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nhibernate/nhibernate.mysqlconnector
- Owner: nhibernate
- License: lgpl-2.1
- Created: 2017-12-13T22:49:00.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T17:04:58.000Z (3 months ago)
- Last Synced: 2025-04-09T18:23:38.345Z (3 months ago)
- Topics: mysqlconnector, nhibernate
- Language: C#
- Size: 57.6 KB
- Stars: 9
- Watchers: 8
- Forks: 10
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# NHibernate.MySqlConnector
This [package](https://www.nuget.org/packages/NHibernate.Driver.MySqlConnector) provides an alternative MySQL/MariaDB driver for NHibernate
in addition to `NHibernate.Driver.MySqlDataDriver` provided by `nhibernate-core`.It uses the [MySqlConnector](https://github.com/mysql-net/MySqlConnector) library
which is an alternative to [MySql.Data](https://www.nuget.org/packages/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`