Reputation: 1677
The StructureMap.WebApi2 package has a dependency to StructureMap.MVC5 which in return has a dependency to System.Web.Mvc.
As we are building a Web API-only project we don't want to include the System.Web.Mvc assembly.
Is it possible to use StructureMap in Web API 2 without this dependency?
Upvotes: 2
Views: 830
Reputation: 4130
Autofac is a good Ioc for Web Api, and Autofac is far better in documentation than structuremap, most of the structuremap examples are old and useless for version 3 for example.
Hope that helps.
Upvotes: 0
Reputation: 20033
Sadly no.
StructureMap
is made for MVC
so it obviously depends on it.
Why do you insist on using StructureMap
though? All it does is DI
and there are many other options to do DI
in Web API
, like Ninject
and Unity
.
Upvotes: 1