46 lines
1.9 KiB
C#
46 lines
1.9 KiB
C#
using BMA.EHR.Recurit.Exam.Service.Models;
|
|
using BMA.EHR.Recurit.Exam.Service.Models.Documents;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using BMA.EHR.Domain.Models.Placement;
|
|
|
|
namespace BMA.EHR.Recurit.Exam.Service.Data
|
|
{
|
|
public class OrgDbContext : DbContext
|
|
{
|
|
public OrgDbContext(DbContextOptions<OrgDbContext> 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<Prefix> prefixe { get; set; }
|
|
public DbSet<Religion> religion { get; set; }
|
|
public DbSet<EducationLevel> educationLevel { get; set; }
|
|
public DbSet<Relationship> relationship { get; set; }
|
|
public DbSet<Province> province { get; set; }
|
|
public DbSet<District> district { get; set; }
|
|
public DbSet<SubDistrict> subDistrict { get; set; }
|
|
public DbSet<Gender> gender { get; set; }
|
|
}
|
|
}
|