MySQL NHibernate Mono Configuration
<?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