workflow-core
workflow-core copied to clipboard
Why can'not I use constructor function in workflow step function
As shown in the following picture,When I want to use efcore in a step, I need a constructor, but when I use it, I start the workflow and can't jump to the first step, who can help me would be very grateful
I know it's late, but for the sake of anyone else that this might help, you can inject dependencies into steps, you just have to make sure to register your steps in the IServiceCollection. See the docs here: https://workflow-core.readthedocs.io/en/latest/getting-started/#injecting-dependencies-into-steps