views:

189

answers:

1

I see a lot of exampls of how to use StructureMap in a asp.net project like this:

StructureMapConfiguration.ForRequestedType<IResourceA>()
    .TheDefaultIsConcreteType<ResourceB>()
    .CacheBy(InstanceScope.Singleton);

Yet, in my Global.asax I can not access the StructureMapConfiguration object even when I import the StructureMap namespace. What is the deal here? Am I missing something?

+3  A: 

Have you tried the new format:

i.e. in the form:

For<IResourceA>().Use<ResourceB>();
Simmo
Thanks for that, I actually figured it out too and came back to post it here but you had it already :) Works like a charm.
Am