1

what I want to know If there is a way or an good article on how to manage the objectcontext life cycle through structuremap (I saw an example with ninject). Since I'm new to the methods and possibilities of SM I really don't know How/If possible to make it. In the first moment I wanted to make a singleton of the objectcontext per httpcontext. Thanks for any advice.

Diego Correa
  • 767
  • 2
  • 9
  • 22

1 Answers1

0

The following is a good starting point for StructureMap StructureMap: Basic Scenario Usage which under the heading of Object Lifetime Manager, discusses object lifetime.

Also the other StackOverflow question 'What is the difference between HybridHttpOrThreadLocalScoped & HttpContextScoped' can shed some light on the two available context's in StructureMap.

This question was marked with "entity-framework" tag but I have most of my experience with StructureMap, some with Ninject, and now I'm learning AutoFac.

I know this is an old question but it's a good one to answer.

Community
  • 1
  • 1
Bryan Bailliache
  • 1,173
  • 9
  • 10