這幾天嘗試著使用nhibernate
配合Visual Studio,真的從沒感覺程式這麼好寫
一個datagridview的畫面,不到一個早上就完成
剛開始嘗試時
實在很難找到搭配MySQL的設定該如何寫
所以在這邊貼一下
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> <property name="connection.connection_string">Server=localhost; Port=3306; Database=buy_together; Uid=root; Pwd=xxxxxx</property>
<property name="show_sql">true</property> </session-factory> </hibernate-configuration>
|