Abd*_*med 9 nhibernate nhibernate-configuration
我在hibernate.cfg.xml中进行了这个配置:
<?xml version="1.0" encoding="utf-8" ?>
<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.MsSql2005Dialect</property>
<property name="connection.connection_string">Data Source=.\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=SSPI;</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
Run Code Online (Sandbox Code Playgroud)
我刚刚创建了一个类库,并且我使用MbUnit创建了一个集成测试.它失败.报告的一部分(我认为足够了)在这里:
** NO TESTS WERE RUN (No tests found) **
TestCase 'M:IntegrationTests.RepositoryTests.ListAllPostsReturnsAListOfPost'
failed: The ProxyFactoryFactory was not configured.
Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.
Run Code Online (Sandbox Code Playgroud)
我已经阅读了很多教程,并没有看到这个代理工厂配置.指定它真的有必要吗?如果是这样,我该怎么做?我是否要引用其他一些图书馆?
归档时间: |
|
查看次数: |
5277 次 |
最近记录: |