I have a WPF application that runs on the client. I have two different databases that the application uses. One of them is SQL Server 2008 for application data, and the other is Sql Server Compact for user settings stored on the client. I am using app.config to configure NHibernate. I have seen many articles using the "schema" attribute in the class mapping file, but this only works if I connect to the same SQL Server. How to configure NHibernate to install two different session factories?
I would like to configure this in the app.config file, if possible.
: NHibernate
, , Fluent NHibernate , NH NH , app.config(, web.config). , , , Bill McCafferty CodeProject.
- , :
Configuration cfg = new Configuration(); cfg.Configure(sessionFactoryConfigPath); sessionFactory = cfg.BuildSessionFactory();
, factory factory.
. , . NHibernate hibernate.cfg.xml,
Source: https://habr.com/ru/post/1708911/More articles:Тайм-аут хранимой процедуры - но при запуске из SSMS - vb6Silverlight text box cancels - silverlightAlternative to javax.activation.MimetypesFileTypeMap (). GetContentType (file name); - javaHibernate calls flush on find - causes non-null error - javaЕсть ли простой способ для итератора по статическому списку строк в С++ - c++Как я должен дезинфицировать пользовательский ввод, прежде чем передавать его на% x (его выполнение)? - rubyHow to store data on a page and retrieve it through jQuery? - jqueryНастройте файл NHibernate hibernate.cfg.xml, чтобы иметь больше строк подключения - nhibernateHow to pass the result of the command to the parameter - ? (No spaces) - bashWCF Message Logging - c #All Articles