0
我有MappingNHibernateException錯誤消息:NHibernate的裝載錯誤消息
{ 「無法編譯映射文檔:Infrastructure.DataAccess.Mappings.Post.hbm.xml」}
Could not find the dialect in the configuration
在部分
Configuration configuration = new Configuration()
.AddAssembly("Infrastructure");
_sessionFactory = configuration.BuildSessionFactory();
有什麼不對?
的hibernate.cfg.xml
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver </property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.connection_string">Server=localhost\SQLServer2005;database=NHibernate101;Integrated Security=True;</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<mapping assembly="Infrastructure"></mapping>
</session-factory>
</hibernate-configuration>
我使用一個hibernate.cfg.xml文件,並在文件中我有......看在編輯的部分..我需要做點別的嗎? – learning 2010-09-20 05:56:24