Add Oracle For ApplicationDBContext and ApplicationDBExamContext
This commit is contained in:
parent
f5558747d8
commit
ff711c38df
10 changed files with 39109 additions and 11 deletions
|
|
@ -13,6 +13,7 @@ using BMA.EHR.Domain.Models.Probation;
|
|||
using BMA.EHR.Domain.Models.Retirement;
|
||||
using BMA.EHR.Domain.ModelsExam.Candidate;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Persistence
|
||||
{
|
||||
|
|
@ -31,9 +32,23 @@ namespace BMA.EHR.Infrastructure.Persistence
|
|||
|
||||
public ApplicationDBExamContext(DbContextOptions<ApplicationDBExamContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Task<int> SaveChangesAsync()
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
// exam service
|
||||
modelBuilder.Entity<Candidate>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
modelBuilder.Entity<Career>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
modelBuilder.Entity<Education>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
modelBuilder.Entity<PeriodExam>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
modelBuilder.Entity<PositionExam>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
modelBuilder.Entity<Document>().Metadata.SetIsTableExcludedFromMigrations(true);
|
||||
}
|
||||
|
||||
public Task<int> SaveChangesAsync()
|
||||
{
|
||||
return base.SaveChangesAsync();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue