2023-05-28 09:56:49 +00:00
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
2024-10-15 21:16:50 +00:00
|
|
|
namespace Elsa.EntityFrameworkCore;
|
2023-05-28 09:56:49 +00:00
|
|
|
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Provides options for configuring Elsa's Entity Framework Core integration.
|
|
|
|
|
/// </summary>
|
2023-05-28 09:56:49 +00:00
|
|
|
public class ElsaDbContextOptionsExtension : IDbContextOptionsExtension
|
|
|
|
|
{
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="ElsaDbContextOptionsExtension"/> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="options">The options.</param>
|
2023-05-28 09:56:49 +00:00
|
|
|
public ElsaDbContextOptionsExtension(ElsaDbContextOptions? options)
|
|
|
|
|
{
|
2023-05-28 14:40:48 +00:00
|
|
|
Options = options;
|
2023-05-28 09:56:49 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the options.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ElsaDbContextOptions? Options { get; }
|
2023-05-28 09:56:49 +00:00
|
|
|
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <inheritdoc />
|
2023-05-28 09:56:49 +00:00
|
|
|
public DbContextOptionsExtensionInfo Info => new CustomDbContextOptionsExtensionInfo(this);
|
|
|
|
|
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <inheritdoc />
|
2023-05-28 09:56:49 +00:00
|
|
|
public void ApplyServices(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-28 14:40:48 +00:00
|
|
|
/// <inheritdoc />
|
2023-05-28 09:56:49 +00:00
|
|
|
public void Validate(IDbContextOptions options)
|
|
|
|
|
{
|
2023-11-19 09:22:13 +00:00
|
|
|
|
2023-05-28 09:56:49 +00:00
|
|
|
}
|
|
|
|
|
}
|