using Microsoft.EntityFrameworkCore; namespace BMA.EHR.Recurit.Service.Data { public class MetadataDbContext : DbContext { public MetadataDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { } // The following configures EF to create a Sqlite database file in the // special "local" folder for your platform. protected override void OnConfiguring(DbContextOptionsBuilder options) { // if (!options.IsConfigured) // { // var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"; // var configurationBuilder = new ConfigurationBuilder() // .AddJsonFile("appsettings.json", optional: true, true) // .AddJsonFile($"appsettings.{environment}.json", true, true) // .AddEnvironmentVariables() // .Build(); // var historyConnection = configurationBuilder.GetConnectionString("HistoryConnection"); // options.UseMySql(historyConnection, ServerVersion.AutoDetect(historyConnection)); // } } public DbSet ProfileOrganizations { get; set; } public DbSet Organizations { get; set; } } }