workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

Why can'not I use constructor function in workflow step function

Open codecodecookie opened this issue 1 year ago • 1 comments

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

企业微信截图_17089170281833

codecodecookie avatar Feb 26 '24 03:02 codecodecookie

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

jordanwallwork avatar May 31 '24 09:05 jordanwallwork