* 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.
40 lines
1,012 B
C#
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;
|
|
}
|
|
}
|