Replies: 2 comments 1 reply
-
To resolve the compile error you're encountering when trying to use your custom The
Here's an example of how you might configure your custom public class MyCustomDbContext : DbContext
{
public MyCustomDbContext(DbContextOptions<MyCustomDbContext> options) : base(options)
{
}
// Your custom DbSets...
public DbSet<WorkflowInstance> WorkflowInstances { get; set; }
public DbSet<WorkflowDefinition> WorkflowDefinitions { get; set; }
// Other Elsa-related DbSets...
}
// ...
builder.Services.AddElsa(elsa =>
{
// Use your custom DbContext for the management layer.
elsa.UseWorkflowManagement(management => management.UseEntityFrameworkCore<MyCustomDbContext>());
// Use your custom DbContext for the runtime layer.
elsa.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore<MyCustomDbContext>());
}); If you continue to experience issues, please provide the exact error message you're receiving, and ensure that your project references the correct versions of the Elsa packages. This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
-
I am using the version 3.1.3, does this version has the extension method UseEntityFrameworkCore() ? Or Do I need to use an upgraded version ? When I checked the source code in git hub I couldnt find this extension method in the class Elsa.EntityFrameworkCore.Modules.Management.WorkflowManagementFeatureExtensions |
Beta Was this translation helpful? Give feedback.
-
I am trying to use custom db context for elsa as below
public class MyCustomDbContext : DbContext
{
public MyCustomDbContext(DbContextOptions options) : base(options)
{
}
}
// ...
builder.Services.AddElsa(elsa =>
{
// Use your custom DbContext for the management layer.
elsa.UseWorkflowManagement(management => management.UseEntityFrameworkCore());
});
But am getting a compile error when using the extension UseEntityFrameworkCore(), WorklfowManagementFeature does not contain a definition for UseEntityFrameworkCore
Beta Was this translation helpful? Give feedback.
All reactions