Open mika76 opened 6 years ago
This is great for controllers but does not work for custom filters and if you add a dependency in your custom filter (property injection) it never get's resolved.
The only way I figured out how to do this was from https://michael-mckenna.com/dependency-injection-for-asp-net-web-api-action-filters-in-3-easy-steps/ where he creates a custom UnityFilterProvider. This is so benificial I'm not sure why it's not in this package...
I would be happy to add it if someone creates a pull request. Make sure you add some testing as well.
This is great for controllers but does not work for custom filters and if you add a dependency in your custom filter (property injection) it never get's resolved.
The only way I figured out how to do this was from https://michael-mckenna.com/dependency-injection-for-asp-net-web-api-action-filters-in-3-easy-steps/ where he creates a custom UnityFilterProvider. This is so benificial I'm not sure why it's not in this package...