For NHibernate and .NET Core, I have a hibernate.cfg.xml
file defined as:
<?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="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=.;Database=OrmCookbook;Trusted_Connection=True;</property>
<property name="show_sql">false</property>
</session-factory>
</hibernate-configuration>
- What is the syntax for putting it in my
appsettings.json
file? - What is the syntax for loading said json file?
Alternately, if it possible to move just the connection string into appsettings.json
? That's the one I need to control the most.