hrms-api-recruit/Data/MetadataDbContext.cs
2025-01-05 21:59:00 +07:00

58 lines
2.9 KiB
C#

using Microsoft.EntityFrameworkCore;
using BMA.EHR.MetaData.Service.Models;
using BMA.EHR.Domain.Models.Placement;
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; }
public DbSet<Placement> Placements { get; set; }
public DbSet<PlacementCertificate> PlacementCertificates { get; set; }
public DbSet<PlacementEducation> PlacementEducations { get; set; }
public DbSet<PlacementIsProperty> PlacementIsProperties { get; set; }
public DbSet<PlacementProfile> PlacementProfiles { get; set; }
public DbSet<PlacementType> PlacementTypes { get; set; }
// public DbSet<BloodGroup> BloodGroups { get; set; }
// public DbSet<District> Districts { get; set; }
// public DbSet<EducationLevel> EducationLevels { get; set; }
// public DbSet<Gender> Genders { get; set; }
// public DbSet<PositionPath> PositionPaths { get; set; }
// public DbSet<Prefix> Prefixes { get; set; }
// public DbSet<Province> Provinces { get; set; }
// public DbSet<Relationship> Relationships { get; set; }
// public DbSet<Religion> Religions { get; set; }
// public DbSet<SubDistrict> SubDistricts { get; set; }
// public DbSet<BMA.EHR.Profile.Service.Models.HR.Profile> Profiles { get; set; }
// public DbSet<BMA.EHR.Profile.Service.Models.HR.ProfileSalary> ProfileSalaries { get; set; }
}
}