How to use IMemberManager in Form custom workflow
# help-with-umbraco
d
Hi, I'm facing with this error in my custom Form workflow:
Could not resolve 'MyCustomFormWorkflow' from root provider because it requires scoped service 'Umbraco.Cms.Core.Security.IMemberManager'
when I try to DI the IMemberManager. What should I do?
m
Did you also register MyCustomFormWorkflow to the DI container?
d
Copy code
csharp
public class CustomWorkflowComposer : IComposer
    {
        public void Compose(IUmbracoBuilder builder)
        {
            builder.WithCollectionBuilder<WorkflowCollectionBuilder>()
                    .Add<MyCustomFormWorkflow>()
        }
    }
Do you mean this?
m
Yeah was just checking, but I think what it says is that it can't create the workflow as the workflow isn't a scoped dependency but it's probably a Singleton, so you can't have a scoped depdendency in your workflow.
d
Yes, I knew it. I want to ask the way to use it
3 Views