Dependency Injection Into Business Rule #2063
-
Is there a way to inject a dependency into a custom business rule? I am looking for any way, either via constructor, parameter, and if those are not possible than getting the dependency via the IServiceProvider. (I can't figure out how to access the IServiceProvider within the rule.) Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
rockfordlhotka
Jan 22, 2021
Replies: 1 comment 3 replies
-
That is not possible in CSLA 5, but should be possible in CSLA 6 (though that is something I'd need to confirm). Out of curiosity, what do you want to inject into the rule instance? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
saulyt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is not possible in CSLA 5, but should be possible in CSLA 6 (though that is something I'd need to confirm).
Out of curiosity, what do you want to inject into the rule instance?