Closed ericsampson closed 3 years ago
I noticed that here in AddHybridModelBinder() that it's building a serviceprovider.
AddHybridModelBinder()
There's a cleaner way to do this, that doesn't require building an intermediate serviceprovider (and the drawbacks it entails): https://andrewlock.net/accessing-services-when-configuring-mvcoptions-in-asp-net-core/
I don't have time right this second to make a PR, but wanted to note it at least.
Cheers!
Thanks for the feedback. That was fun to implement.
I noticed that here in
AddHybridModelBinder()
that it's building a serviceprovider.There's a cleaner way to do this, that doesn't require building an intermediate serviceprovider (and the drawbacks it entails): https://andrewlock.net/accessing-services-when-configuring-mvcoptions-in-asp-net-core/
I don't have time right this second to make a PR, but wanted to note it at least.
Cheers!