Created
May 3, 2011 17:24
-
-
Save I82Much/953762 to your computer and use it in GitHub Desktop.
MySQL NHibernate Mono Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> | |
<!-- an ISessionFactory instance --> | |
<session-factory> | |
<!-- properties --> | |
<property name="connection.provider"> | |
NHibernate.Connection.DriverConnectionProvider | |
</property> | |
<property name="connection.driver_class"> | |
NHibernate.Driver.MySqlDataDriver | |
</property> | |
<property name="connection.connection_string"> | |
<!-- Found from http://www.connectionstrings.com/mysql; note that the 'dev' and 'test_password' | |
match the user we created, and 'products' matches the Database --> | |
Server=localhost;Database=products;Uid=dev;Pwd=test_password; | |
</property> | |
<!-- Will automatically create a fresh table each time we create an ISessionFactory object --> | |
<property name="hbm2ddl.auto">create-drop</property> | |
<property name="dialect"> | |
NHibernate.Dialect.MySQLDialect | |
</property> | |
<property name="show_sql">true</property> | |
</session-factory> | |
</hibernate-configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment