Autofac and Structuremap are "non native" DI containers.
I now have a solution to create child containers using the native Microsoft ServiceProvider: https://github.com/dazinator/Dazinator.Extensions.DependencyInjection/blob/develop/src/DependencyInjection.ChildContainers/README.md
I'll need to make this the "default" approach used, and possibly deprecate autofac and structuremap until they can be added back in future (if its too much work to tackle at this stage)
This will help solve a number of issues a bugs like #74
I was also never truly happy with the resolution of #38 because it involved creating a temporary "copy" of services that needed to be present in the child IServiceCollection when building the child container otherwise AddXyz() calls that look for those services and sometimes grab instances, could fail. The new approach solves that thanks to ChildServiceCollection: https://github.com/dazinator/Dazinator.Extensions.DependencyInjection/blob/develop/src/DependencyInjection.Tests/ChildServiceProvider/ChildServiceCollectionTests.cs
Autofac and Structuremap are "non native" DI containers.
I now have a solution to create child containers using the native Microsoft ServiceProvider: https://github.com/dazinator/Dazinator.Extensions.DependencyInjection/blob/develop/src/DependencyInjection.ChildContainers/README.md
I'll need to make this the "default" approach used, and possibly deprecate autofac and structuremap until they can be added back in future (if its too much work to tackle at this stage)
This will help solve a number of issues a bugs like #74
I was also never truly happy with the resolution of #38 because it involved creating a temporary "copy" of services that needed to be present in the child IServiceCollection when building the child container otherwise AddXyz() calls that look for those services and sometimes grab instances, could fail. The new approach solves that thanks to
ChildServiceCollection: https://github.com/dazinator/Dazinator.Extensions.DependencyInjection/blob/develop/src/DependencyInjection.Tests/ChildServiceProvider/ChildServiceCollectionTests.cs