Injecting ISession Into My Repositories Using Structuremap in a Asp.Net MVC Application

后端 未结 2 1104
灰色年华
灰色年华 2021-01-01 06:11

My repositories all take ISession in the constructor:

protected Repository(ISession session)
{
     this.session = session;
}
private readonly ISession sessi         


        
2条回答
  •  借酒劲吻你
    2021-01-01 06:33

    This question & answers might help you.

    One way to go - steal nhibernate session management from "S#arp Architecture". Works great.

提交回复
热议问题