How to use NHibernate with both MySQL server and Microsoft SQL server 2008

后端 未结 2 1335
慢半拍i
慢半拍i 2021-01-29 03:44

How can I configure NHibernate to connect to both a MySQLserver and a Microsoft SQL server 2008? I do want to copy data from one server to another. I heard of NHibernate shared.

2条回答
  •  不要未来只要你来
    2021-01-29 04:38

    It's not clear what your use case is, but you will simply need to create 2 session factories. One will use your mySQL dialect, connection string, etc... and the other will use the SQL Server equivalents.

    Just avoid including any custom SQL in your mappings and this should work fine.

提交回复
热议问题