JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
563 stars 118 forks source link

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

Closed rizi closed 6 months ago

rizi commented 7 months ago

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.