开发者

Nhibernate, two projects with different sessionfactories in silverlight, resolving the wrong one

I have a problem with the binding of the sessionfactory and working with two silverlight projects and two sessionfactories.

I have one "main-project" which works against one database that need to access a second database trough a wcf-service-call. The second project (backend) has its own sessionfactory for accessing the database.

My problem is that I bind the sessionfactory to the HttpContext with ManagedWebSessionContext.Bind(HttpContext.Current, _sessionFactory.OpenSession()) with all my regular service-calls but when i call the service on the backend-project I want to use the backend-sessionfacto开发者_如何学Pythonry. When I make this call i get the sessionfactory for the main-project instead of the on for the backend-project. How can i do that?


This was not a problem when we deployed to our testserver so it's seems to be a problem only if I run the projects in the same environment as I do in debug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜