nant を使用して nhibernate.config ファイルから接続文字列を変更するにはどうすればよいですか
問題は、すべての例が属性値の変更に関するものですが、nhibernate には内部テキストがあることです。
式:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.connection_string">Data Source.\server;Database=UnitTestDb;UID=user;pwd=pass;</property>
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="show_sql">true</property>
<property name="connection.release_mode">auto</property>
<property name="adonet.batch_size">500</property>
....
プロパティ connection.connection_string を変更する必要があります
<xmlpoke file="${nhibernate.file}"
xpath="/hibernate-configuration/session-factory/add[@key='connection.connection_string']/@value"
value="${connection.string}">
</xmlpoke>
この場合、これは機能しません。
ありがとう