Skip to content

Instantly share code, notes, and snippets.

@ronnieoverby
Created May 7, 2012 03:37
Show Gist options
  • Save ronnieoverby/2625747 to your computer and use it in GitHub Desktop.
Save ronnieoverby/2625747 to your computer and use it in GitHub Desktop.
public class RavenModule : NinjectModule
{
public override void Load()
{
Bind<IDocumentStore>().ToConstant(CMSConfiguration.Instance.DocumentStore);
Bind<IDocumentSession>().ToMethod(x => x.Kernel.Get<IDocumentStore>().OpenSession()).InRequestScope();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment