2024-10-14 19:03:39 +00:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
using Elsa.Secrets.Persistence.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
|
|
namespace Elsa.EntityFrameworkCore.Extensions;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Provides extensions to configure EF Core to use SqlServer.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class SecretsSqlServerProvidersExtensions
|
|
|
|
|
|
{
|
|
|
|
|
|
private static Assembly Assembly => typeof(SecretsSqlServerProvidersExtensions).Assembly;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Configures the feature to use SqlServer.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static EFCoreSecretPersistenceFeature UseSqlServer(this EFCoreSecretPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = null)
|
2024-10-15 21:16:50 +00:00
|
|
|
|
{
|
|
|
|
|
|
feature.UseSqlServer(Assembly, connectionString, options);
|
2024-10-14 19:03:39 +00:00
|
|
|
|
return feature;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|