Answers for "do not inject your dependencies into the constructor. instead you can add dependencies into the invoke method and .net core will work it out."

C#
0

register all services microsoft .net core dependency injection container

service.RegisterAssemblyPublicNonGenericClasses(… your assembly ref goes here …)
.Where(x => x.Name.EndsWith(“Service”))  //optional
.IgnoreThisInterface<IMyInterface>()     //optional
.AsPublicImplementedInterfaces(ServiceLifetime.Scoped);
Posted by: Guest on November-24-2020

Code answers related to "do not inject your dependencies into the constructor. instead you can add dependencies into the invoke method and .net core will work it out."

C# Answers by Framework

Browse Popular Code Answers by Language