NHibernate: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 11: Line 11:
   </session-factory>
   </session-factory>
</hibernate-configuration>
</hibernate-configuration>
</source>
==App Settings==
<source lang="bash">
{
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "SqlServer": "Data Source=(localdb)\\MSSQLLocalDB;Database=hibernate;Integrated Security=True",
    "Oracle": "Data Source=iis0.dev.shahed.biz:1521/xe;User Id=shahed_boot_dev;Password=shahed_boot_dev",
    "MySQL": "Server=db00.dev.shahed.biz;Port=3306;Database=shahed_boot_dev;User Id=shahed_boot_dev;Password=shahed_boot_dev",
    "PostgreSQL": "Server=db00.dev.shahed.biz;Port=5432;Database=shahed_boot_dev;User Id=shahed_boot_dev;Password=shahed_boot_dev"
  }
}
</source>
</source>



Revision as of 10:31, 20 December 2020

Oracle Managed Client

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
  <session-factory>
    <property name="connection.driver_class">NHibernate.Driver.OracleManagedDataClientDriver</property>
    <property name="connection.connection_string">User Id=user;Password=p@$$w0rd;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.19.83.207)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)))</property>
    <property name="show_sql">true</property>
    <property name="dialect">NHibernate.Dialect.Oracle10gDialect</property>
    <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
  </session-factory>
</hibernate-configuration>

App Settings

{
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "SqlServer": "Data Source=(localdb)\\MSSQLLocalDB;Database=hibernate;Integrated Security=True",
    "Oracle": "Data Source=iis0.dev.shahed.biz:1521/xe;User Id=shahed_boot_dev;Password=shahed_boot_dev",
    "MySQL": "Server=db00.dev.shahed.biz;Port=3306;Database=shahed_boot_dev;User Id=shahed_boot_dev;Password=shahed_boot_dev",
    "PostgreSQL": "Server=db00.dev.shahed.biz;Port=5432;Database=shahed_boot_dev;User Id=shahed_boot_dev;Password=shahed_boot_dev"
  }
}

References