elsa-core/src/modules/Elsa.Persistence.EFCore.Common/CustomDbContextOptionsExtensionInfo.cs
Sipke Schoorstra ff1f0833ad
Restore EF Core persistence layer (#6931)
* Restore EF Core persistence layer

Originally, we had moved EF Core to the extensions repo, but in practice this turned out to be rather impractical when debugging elsa-core, given that we would lose all of the state (workflow definitions, instances, etc.) across application restarts.

* Integrate PostgreSQL support into EF Core persistence and enhance BlobStorage workflows provider setup.
2025-09-27 20:39:18 +02:00

40 lines
1,012 B
C#

using Microsoft.EntityFrameworkCore.Infrastructure;
namespace Elsa.Persistence.EFCore;
/// <summary>
/// Contains options for configuring Elsa's Entity Framework Core integration.
/// </summary>
public class CustomDbContextOptionsExtensionInfo : DbContextOptionsExtensionInfo
{
/// <inheritdoc />
public CustomDbContextOptionsExtensionInfo(IDbContextOptionsExtension extension)
: base(extension)
{
}
/// <inheritdoc />
public override bool IsDatabaseProvider => false;
/// <inheritdoc />
public override string LogFragment => "";
/// <inheritdoc />
public override int GetServiceProviderHashCode()
{
// Return a unique hash code for your custom extension
return 0;
}
/// <inheritdoc />
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
{
}
/// <inheritdoc />
public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
{
return true;
}
}