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

Injecting services indiviually help

$
0
0

Hi

I have a lot of services which i need to inject, I don't want to have to go through them individually, is there a better way to add them in bulk?

(eg in my MVC5project i do something like:

builder.RegisterAssemblyTypes(Assembly.Load("Service"))

.Where(t => t.Name.EndsWith("Service"))

.AsImplementedInterfaces()

.InstancePerLifetimeScope();

)

Any suggestions?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>