8

does anybody know how to configure NHibernate properties file to use a connection string already specified in configuration element?

1 Answer 1

24

I found it on google.com:

<connectionStrings>
    <add name="connection_string_name" connectionString="[connection string]"/>
</connectionStrings>

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory>
        ...
        <property name="connection.connection_string_name">connection_string_name</property>
        ...
    </session-factory>
</hibernate-configuration>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.