Using MySQL prompts no context
Describe the bug
my system: mac os
using pack: WorkflowCore.Persistence.MySQL / Workflow.Core
framework: net6.0
error Message:
No database provider has been configured for this DbContext. A provider can be configured by overriding the 'DbContext.OnConfiguring' method or by using 'AddDbContext' on the application service provider. If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.
To Reproduce ex: string connectionString = builder.Configuration.GetConnectionString("Conection"); builder.Services.AddWorkflow(options => { options.UseMySQL(connectionString, false, false); }); builder.Services.AddControllers(); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); var app = builder.Build(); var host = app.Services.GetService<IWorkflowHost>(); host.RegisterWorkflow<LeaveWorkFlowApp,LeveManager>(); host.Start();
I have the same problem!
@xuguilins WorkflowCore. Persistence. MySQL version 3.6.2 can normal use.
There was an error when using MySql persistence version 3.6.3 with .NET 6.
Update WorkflowCore. Persistence. MySQL to 3.6.4 or 3.6.5 .
@blance1024 I'm sorry I only read the news now, I solved this problem later