Ben hibernate.cfg.xml bu yapılandırmayı ettik:NHibernate'de Proxy Factory gerekli mi?
<?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>
Ben sadece bir sınıf kitaplığı oluşturduk ve ben MbUnit kullanarak bir entegrasyon testi oluşturduk. Başarısız. Raporun (I yeterli olduğunu düşünüyorum bir) bir kısmı buraya: Birçok öğreticiler okudum ve bu vekil fabrika yapılandırması görmedim
** 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.
. Gerçekten gerekli belirtiyor mu? Eğer öyleyse, bunu nasıl yapabilirim? Başka bir kütüphaneye başvurmak zorunda mıyım?
[Bu yanıt] 'a (http://stackoverflow.com/a/8932549/326110) göre, artık proxy'leri yapılandırmanıza bile gerek yoktur. –