-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring back cross-wiring in SimpleInjector.Integration.AspNetCore #437
Comments
That is some nice piece of code you produced there! Will it help you if I took the burden of documenting this new feature? Maybe with some sample code how you can use this to make the default VS template with Identity can be made working. |
Absolutely! That would certainly help. Thanks. |
Looking forwards to trying all this out, thanks for all the work @dotnetjunkie and @TheBigRic documentation. |
@TheBigRic looking forward to the docs, I'll try it out too and report feedback if needed. |
The documentation is available here |
@TheBigRic thanks for the bootstrap worked a treat. |
The beta releases of Simple Injector's ASP.NET Core integration library contained a
CrossWire
method that allowed to simplify registration of services that should be resolved from the ASP.NET Core container. This feature was however removed before RTM because of its limitations and because it promotes a model where people would do a lot of cross-wirings, instead of hiding those services behind application-specific abstractions.In colaboration with @TheBigRic, I've been looking at the integration path of Identity Framework core. Ric and I found out that cross-wiring Identity types such as
UserManager<T>
andSignInManager<T>
was extremely cumbersome without having this functionality as part of the integration library. Although much of the problems is caused by design flaws in Identity Framework and its default Visual Studio template, both are hard to work around for a user that just wants to bootstrap everything. This makes the experience of using Simple Injector in this case very cumbersome.For this reason, the
CrossWire
functionality has to returns. Important behavior for this feature is:DisposableTransientComponent
warning should be suppressed for transient cross-wired dependencies that implementIDisposable
, since the Core configuration system is responsible for disposing them.The text was updated successfully, but these errors were encountered: