Open jwyoung9 opened 5 years ago
Which version? The latest configures everything as Transient
<PackageReference Include="MediatR" Version="7.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.27" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
Ah - looks like it!
Hitting the same wall at the moment with the Azure Functions hots.
Hitting the same issue.
I'm trying to use the new dependency injection features with Azure Functions where each invocation of the function should run within a dedicated scope. If I configure a scoped service, the instance injected into the function class is fine and changes each time the function is executed. However, the version injected into the request handler is always the same instance (singleton) and does not appear to be honoring the scope.
A sample project to repro the issue is attached: function_mediatr_test.zip