ReplaceTransient<TService, TImplementation>(IServiceCollection)

public static IServiceCollection ReplaceTransient<TService, TImplementation>(IServiceCollection collection) where TImplementation : TService
Returns:
IServiceCollection

Parameters

collection IServiceCollection

Type Parameters

TService TImplementation TService

ReplaceTransient(IServiceCollection, Type, Type)

public static IServiceCollection ReplaceTransient(IServiceCollection collection, Type serviceType, Type implementationType)
Returns:
IServiceCollection

Parameters

collection IServiceCollection
serviceType Type
implementationType Type
In this article