Regression since 1.1.x with ComplexTypeModelBinder
Hi,
I updated Microsoft.AspNetCore.Mvc package to 1.1.1 and since, our application does not work correctly cause of the ComplexTypeModelBinder.
It checks for default constructor of my view model and also its nested properties.
In my case, I have kind of following structure ->View ---->ViewModel (no default constructor cause i need dependencies from service provider) -------> Entity1 (no default constructor cause i need dependencies from service provider) -------> Entity2 (no default constructor cause i need dependencies from service provider)
It's not compatible with modifications you brought with 1.1.0, 1.1.1 and even with the fix #5698
Please fix this bug cause it means that you don't allow dependency injection for models...
Thanks
@kichalla can you try this out with the latest 1.1.2 code?
@marcusien BTW we did re-do part of the fix for #5698 so if you were trying out the code from that branch, you might want to try again to see if our re-fixed fix is better 😄
@marcusien it would also be helpful if you could share more info on how you're constructing the model objects. If we can reproduce your case we can help figure this out.
Didnt understood your first message worry, what do i need to try again so ?
BTW i'll try to give you a code sample on monday
@marcusien we would love to see your code sample if you can upload it to GitHub. What I meant in my first message is that we changed how we fixed #5698 so better support the scenario we think you're describing.
In the meantime, @kichalla tried out some similar scenarios on the latest 1.1.1 preview build and he didn't have any issues.
Closing because we don't have enough info.