You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2026. It is now read-only.
Ian Johnson edited this page Sep 7, 2018
·
1 revision
Constructor injection
Service support construction injection by default using the built in DI container or 3rd party container.
Interface as method parameter
By default all non enumerable interfaces parameters will be automatically located from the IServiceProvider. The parameters are not shown in the documentation and expected not to be part of the request.
// callers provide x and ypublicintMethod(IIntMathServicemathService,intx,inty){returnmathService.Add(x,y);}
[FromServices]
Sometimes you need to request concrete types from the container and not from the caller