With structuremap 2.6.4.1 my container is configured like this:
existingContainer.Configure(expression =>
{
expression.For<IDocumentSession>()
.HybridHttpOrThreadLocalScoped()
.Use(container =>
{
var store = container.GetInstance<IDocumentStore>();
return store.OpenSession();
});
}
HybridHttpOrThreadLocalScoped
does not exist in structure map 3 so my question is, what is the equivalent configuration in structuremap 3?
HybridHttpOrThreadLocalScoped
is one of the very best features of structuremap – LaunchHybridHttpOrThreadLocalScoped
in your production configuration, because in case of the absence of a HTTP context, an object will live for the duration of the application; hardly ever a good idea. – SardouHybridHttpOrThreadLocalScoped
is an ultimate reason to use StructureMap and i use it in every project i use StructureMap – Launch