38 lines
1.6 KiB
C#
38 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BMA.EHR.Recurit.Service.Data
|
|
{
|
|
public class MetadataDbContext : DbContext
|
|
{
|
|
public MetadataDbContext(DbContextOptions<MetadataDbContext> 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<BMA.EHR.Profile.Service.Models.HR.ProfileOrganization> ProfileOrganizations { get; set; }
|
|
public DbSet<BMA.EHR.Profile.Service.Models.HR.OrganizationEntity> Organizations { get; set; }
|
|
|
|
}
|
|
}
|