Skip to content

Instantly share code, notes, and snippets.

@kmckelvin
Created August 28, 2010 12:09
Show Gist options
  • Save kmckelvin/555068 to your computer and use it in GitHub Desktop.
Save kmckelvin/555068 to your computer and use it in GitHub Desktop.
public static IMusicStoreContext GetCurrentRequestContext()
{
// get the ISession bound to the current request
var currentSession = SessionFactory.GetCurrentSession();
// build a context object to wrap it
var context = new MusicStoreContext(currentSession);
return context;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment