I used this code in the hibernate.cfg.xml configuration:
<?xml version="1.0"?> <hibernate-configuration xmlns= "urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.driver_class"> NHibernate.Driver.MySqlDataDriver </property> <property name="dialect"> NHibernate.Dialect.MySQLDialect </property> <property name="connection.connection_string"> Database=nhibernate;Data Source=localhost;User Id=root;Password=xxxx</property> <property name="proxyfactory.factory_class"> NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu </property> </session-factory> </hibernate-configuration>
I have a problem creating a database.
NHibernate.HibernateException: Failed to create driver from NHibernate.Driver.MySqlDataDriver. ---> System.Reflection.TargetInvocationException: An exception was thrown by the target of the call. ---> NHibernate.HibernateException: implementation of IDbCommand and IDbConnection in assembly MySql.Data not found ....
What should I do?
mysql nhibernate
Halley
source share