I am trying to use the generic Lazy class to instantiate a costly class with .net core dependency injection extension. I have registered the IRepo type, but I\'m not sure wh
You only need to add a registration for a factory method that creates the Lazy object.
Lazy
public void ConfigureService(IServiceCollection services) { services.AddTransient(); services.AddTransient>(provider => new Lazy(provider.GetService)); }