services.AddScoped()
.AddScoped<IEntityService>(x => x.GetRequiredService())
.Decorate<IEntityService, PaymentInitiationServiceWithCache>()
.AddScoped(x => x.GetRequiredService())
.Decorate<IPaymentInitiationService, PaymentInitiationServiceWithCache>()
.AddScoped(x => x.GetRequiredService());
i Upgrade to 5.0.1 and now i get
System.InvalidOperationException: 'A suitable constructor for type 'TenantConsentsServiceWithCache' could not be located. Ensure the type is concrete and all parameters of a public constructor are either registered as services or passed as arguments. Also ensure no extraneous arguments are provided.'

services.AddScoped()

.AddScoped<IEntityService>(x => x.GetRequiredService())
.Decorate<IEntityService, PaymentInitiationServiceWithCache>()
.AddScoped(x => x.GetRequiredService())
.Decorate<IPaymentInitiationService, PaymentInitiationServiceWithCache>()
.AddScoped(x => x.GetRequiredService());
i Upgrade to 5.0.1 and now i get
System.InvalidOperationException: 'A suitable constructor for type 'TenantConsentsServiceWithCache' could not be located. Ensure the type is concrete and all parameters of a public constructor are either registered as services or passed as arguments. Also ensure no extraneous arguments are provided.'