Add configurations and update packages
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user