大家好,我正在使用 Fluent NHibernate 和 MySQL,但我无法真正访问数据库,我在配置中遇到错误
private static ISessionFactory CreateSessionFactory()
{
var mysqlconf = MySQLConfiguration.Standard
.ConnectionString(c => c.Is("Server=localhost;Database=db;User=root;Password=boot;"));
return Fluently.Configure().Database(mysqlconf).Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<Program>()).
BuildSessionFactory();
}
请帮我配置我的代码以连接到我的数据库
错误
An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.