2012-09-23 71 views
-1

嗨,大家好,我使用功能NHibernate与MySQL,但我真的不能访问数据库,收到错误的配置功能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.

+0

而错误是什么呢? – Arran

+0

创建SessionFactory时使用了无效或不完整的配置。请参阅PotentialReasons集合和InnerException以获取更多详细信息。 –

+0

任何想法?..... –

回答