0

我正在尝试将 NHibernate 配置为使用 MySql 数据库。我使用以下代码:

_sessionFactory = Fluently.Configure().Database(
                MySQLConfiguration.Standard.ConnectionString(
                cs => cs.Server("localhost").Database("Schedule").Username("root").Password("root"))
                ).Mappings(m => m.FluentMappings.AddFromAssemblyOf<NHibernateHelper>()).BuildSessionFactory();

我有以下例外:

怎么解决?

4

1 回答 1

1

MySql ADO.NET driver dll is not in the directory of your program and also not installed. copy MySql.Data.dll into you program dir.

于 2013-11-02T08:35:11.277 回答