Injecting service into a custom BusinessRule #2152
Unanswered
adrianwright109
asked this question in
Questions
Replies: 1 comment
-
There is not currently support for injection into a rule. In CSLA 6 the plan is to allow constructor injection into a rule. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create a custom business rule but am having trouble because in the
protected override void Execute(IRuleContext context)
method I need to be able to access a service from DI.Does anyone who if this is possible and if so how to acheive it?
It looks like you can inject into a
CommandBase
object as shown in the ProjectTracker sampleBeta Was this translation helpful? Give feedback.
All reactions