26 lines
730 B
C#
26 lines
730 B
C#
using GerstITS.Data.EntityFramework;
|
|
using GerstITS.System.Configurations;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace GerstITS.Examples.Api.Configurations;
|
|
|
|
internal sealed class EntityFrameworkMigrationConfiguration : IEntityFrameworkMigrationConfiguration
|
|
{
|
|
#region Constructors
|
|
|
|
public EntityFrameworkMigrationConfiguration(string parentPrefix,
|
|
Microsoft.Extensions.Configuration.IConfiguration configuration)
|
|
{
|
|
var prefix = $"{parentPrefix}:{this.ToConfigurationPrefix()}";
|
|
|
|
AutoMigrate = configuration.GetValue<bool>($"{prefix}:{nameof(AutoMigrate)}");
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IMigrationConfiguration
|
|
|
|
public bool AutoMigrate { get; }
|
|
|
|
#endregion
|
|
} |