Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Resolve dependency injection with default rule automatically

$
0
0

Generally, We inject the dependency like the below for each class.

services.AddTransient<IHttpClientProvider, HttpClientProvider>();

If have huge classes, do we still need to add huge lines(each line for each class) for them. 

Is there a way to inject with default rule (Resolve interface IXXX to class XXX by default) simply?


Viewing all articles
Browse latest Browse all 9386

Trending Articles