Skip to content
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

Don't resolve collections for not registered types when IServiceProviderIsService is used - GH-391 #392

Conversation

rizi
Copy link
Contributor

@rizi rizi commented Nov 23, 2023

At the moment Lamar is used to resolve collection types in methods of web api controllers, therefore the collections are always empty (no matter which values are available in the body of the request).

With this change Lamar will not be used to resolve collection types when the type (e.g IReadOnlyCollection --> UpdateCommand) is not explicitly registered, therefore the asp.net core model builder kicks in and the creates the collection (as expected).

This PR closes #391.

…derIsService is used, in this case the model binder of aps.net core should create the object. Closes JasperFxGH-391
@rizi rizi force-pushed the Fix-GH-391-Dont-Resolve-Collections-For-Not-Registered-Type branch from 35dccbb to 4c11f3c Compare November 23, 2023 16:03
@jeremydmiller jeremydmiller merged commit 608248a into JasperFx:master Dec 14, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IEnumerable<> controller parameters do not bind from request body by default - Asp.net Core 8
2 participants