Created
August 6, 2012 21:12
-
-
Save hmemcpy/3278477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void ConfigureRequestContainer(TinyIoCContainer container, NancyContext context) | |
{ | |
var db = container.Resolve<ISisoDatabase>(); | |
container.Register<ISession>((c, overloads) => new SessionWrapper(db.BeginSession())); | |
} | |
public class SessionWrapper : ISession | |
{ | |
readonly ISession session; | |
public SessionWrapper(ISession session) | |
{ | |
this.session = session; | |
} | |
public void Dispose() <-- put a breakpoint here, never reached it | |
{ | |
session.Dispose(); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment