2012-09-23 70 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

任何想法?..... –

回答