Why doesn't my HttpConfiguration type have a ServiceResolver type using .Net MVC 4 with WebApi?

I use .Net MVC 4 with WebApi and in all the articles that explain how to use the DI container, which has the following configuration line in Global.asax: ( http://blog.ploeh.dk/2012/03/20/RobustDIWithTheASPNETWebAPI .aspx )

GlobalConfiguration.Configuration.ServiceResolver.SetResolver(...) 

But in my non ServiceResolver application, enter:

enter image description here

with intellisense:

enter image description here

What am I doing wrong?

+6
source share
1 answer

It has been renamed DependencyResolver to RC:

 GlobalConfiguration.Configuration.DependencyResolver = ... your custom DR 
+13
source

Source: https://habr.com/ru/post/921547/


All Articles