Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Regression since 1.1.x with ComplexTypeModelBinder #5800

Closed
marcusien opened this issue Feb 14, 2017 · 5 comments
Closed

Regression since 1.1.x with ComplexTypeModelBinder #5800

marcusien opened this issue Feb 14, 2017 · 5 comments

Comments

@marcusien
Copy link

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

@Eilon
Copy link
Member

Eilon commented Feb 17, 2017

@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 😄

@Eilon
Copy link
Member

Eilon commented Feb 17, 2017

@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.

@marcusien
Copy link
Author

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

@Eilon
Copy link
Member

Eilon commented Feb 18, 2017

@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.

@Eilon
Copy link
Member

Eilon commented May 12, 2017

Closing because we don't have enough info.

@Eilon Eilon closed this as completed May 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants