session-per-request

session-per-request implementation for WCF, NHibernate, and Ninject

ぃ、小莉子 提交于 2019-12-09 05:27:58
问题 I am trying to implement a session-per-request model in my WCF application, and I have read countless documents on this topic, but looks like there is not a complete demonstration of this. I actually came across some very useful articles such as this one: NHibernate's ISession, scoped for a single WCF-call but these are all from the old days when NHibernate and Ninject did not have WCF specific implementations, therefore they achieved what I need by implementing their custom service providers

trying to implement session per web request, No current session context configure

帅比萌擦擦* 提交于 2019-12-07 16:54:11
问题 As I said in the title I want to implement session per web request. My session provider is configured like this (I'm not interested in changing this conf.) public class SessionProvider { public static SessionProvider Instance { get; private set; } private static ISessionFactory _SessionFactory; static SessionProvider() { var provider = new SessionProvider(); provider.Initialize(); Instance = provider; } private SessionProvider() { } private void Initialize() { string csStringName =

trying to implement session per web request, No current session context configure

送分小仙女□ 提交于 2019-12-05 20:01:10
As I said in the title I want to implement session per web request. My session provider is configured like this (I'm not interested in changing this conf.) public class SessionProvider { public static SessionProvider Instance { get; private set; } private static ISessionFactory _SessionFactory; static SessionProvider() { var provider = new SessionProvider(); provider.Initialize(); Instance = provider; } private SessionProvider() { } private void Initialize() { string csStringName = "ConnectionString"; var cfg = Fluently.Configure() ....ommiting mappings and db conf. .ExposeConfiguration(c => c