Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created December 7, 2012 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradoyler/4233393 to your computer and use it in GitHub Desktop.
Save bradoyler/4233393 to your computer and use it in GitHub Desktop.
x.ForSingletonOf<IDocumentStore>().Use(() => {
var ds= new DocumentStore();
ds.ConnectionStringName = "Raven";
ds.Initialize();
return ds;
});
x.For<IDocumentSession>().HybridHttpOrThreadLocalScoped().Use(ctx =>
{
return ctx.GetInstance<IDocumentStore>().OpenSession();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment