I would like to ask about Microsoft.Extensions.DependencyInjection library for IoC implementation. Is there a way to do a similar function for the Lamar library function like services.For<TService>().Use<TClient>() in Microsoft.Extension.DependencyInjection?
My code goes like this.
public static void AddSomeServices(this IServiceCollection services, Func<SomeContext> context)
{
// Similar to this implementation
services.For<ISomeService>().Use(ctx => context().Extensions.SomeService);
}
Is there a built-in function like this in Microsoft.Extensions.DependencyInjection?