I am getting the session by injecting session to service method in global.asax as
1
protected void Application_Start()
{
this.RegisterContainer();
}
2
private void RegisterContainer()
{
container.Register<IActivityService>(c => new ActivityService(SessionFactory.GetCurrentSession()));
}
3 In service method i am getting the session as
using (var transaction = _session.BeginTransaction())
{
........................
}
the problem is when concurrent requests came to this service method, it is throwing exceptions.I came to know that Nhibernate is not supporting concurency.Ho to achieve it using Funq Container?