wallymathieu/isop

Correct way to run with StructureMap

Closed this issue · 8 comments

What is now the correct way to run with structremap in the net core version?
The ObjectFactory method is no longer in the configuration object.

As long as StructureMap can be used as an IServiceCollection you should be fine. See Build constructor by using something like StructureMap.Microsoft.DependencyInjection

Seems like the docs could be improved.

All examples of using StructureMap.Microsoft.DependencyInjection returns an IServiceProvider that then is used for getting the Services. and the build doesn't take a IServiceProvider, just a IServiceCollection.

And the question then is how do you make it work in a web app? My guess is that if you have a working solution for that, then you should be able to make a PR with either a documentation fix or update of this library to support your use case.

@petterl how is it going?

Looks like they are sunsetting StructureMap in favor of Lamar. I'll need to review the different alternatives for modern .net apps.

There are preview packages that make it easier to use Isop together with other dependency injection frameworks.