490 lines
24 KiB
C#
490 lines
24 KiB
C#
using BMA.EHR.Application.Common.Interfaces;
|
|
using BMA.EHR.Domain.Models.Commands.Core;
|
|
using BMA.EHR.Domain.Models.Documents;
|
|
using BMA.EHR.Domain.Models.HR;
|
|
using BMA.EHR.Domain.Models.Insignias;
|
|
using BMA.EHR.Domain.Models.Leave;
|
|
using BMA.EHR.Domain.Models.MetaData;
|
|
using BMA.EHR.Domain.Models.Notifications;
|
|
using BMA.EHR.Domain.Models.OrganizationEmployee;
|
|
using BMA.EHR.Domain.Models.Organizations;
|
|
using BMA.EHR.Domain.Models.Organizations.Report2;
|
|
using BMA.EHR.Domain.Models.Placement;
|
|
using BMA.EHR.Domain.Models.Probation;
|
|
using BMA.EHR.Domain.Models.Retirement;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BMA.EHR.Infrastructure.Persistence
|
|
{
|
|
public class ApplicationDBContext : DbContext, IApplicationDBContext
|
|
{
|
|
#region " From Existing Database "
|
|
|
|
#region " Meta Data "
|
|
|
|
public DbSet<Prefix> Prefixes { get; set; }
|
|
|
|
public DbSet<BloodGroup> BloodGroups { get; set; }
|
|
|
|
public DbSet<Gender> Genders { get; set; }
|
|
|
|
public DbSet<PhysicalStatus> PhysicalStatuses { get; set; }
|
|
|
|
public DbSet<Religion> Religions { get; set; }
|
|
|
|
public DbSet<EducationLevel> EducationLevels { get; set; }
|
|
|
|
public DbSet<PositionPath> PositionPaths { get; set; }
|
|
|
|
public DbSet<PositionType> PositionTypes { get; set; }
|
|
|
|
public DbSet<PositionEmployeePosition> PositionEmployeePositions { get; set; }
|
|
|
|
public DbSet<PositionEmployeePositionSide> PositionEmployeePositionSides { get; set; }
|
|
|
|
public DbSet<PositionEmployeeGroup> PositionEmployeeGroups { get; set; }
|
|
|
|
public DbSet<PositionEmployeeLine> PositionEmployeeLines { get; set; }
|
|
|
|
public DbSet<PositionEmployeeLevel> PositionEmployeeLevels { get; set; }
|
|
|
|
public DbSet<PositionEmployeeStatus> PositionEmployeeStatuses { get; set; }
|
|
|
|
public DbSet<PositionLine> PositionLines { get; set; }
|
|
|
|
public DbSet<PositionExecutive> PositionExecutives { get; set; }
|
|
|
|
public DbSet<PositionStatus> PositionStatuss { get; set; }
|
|
|
|
public DbSet<PositionLevel> PositionLevels { get; set; }
|
|
|
|
public DbSet<Relationship> Relationships { get; set; }
|
|
|
|
public DbSet<Position> Positions { get; set; }
|
|
|
|
public DbSet<PositionPathSide> PositionPathSides { get; set; }
|
|
|
|
public DbSet<PositionExecutiveSide> PositionExecutiveSides { get; set; }
|
|
|
|
public DbSet<InsigniaType> InsigniaTypes { get; set; }
|
|
|
|
public DbSet<Insignia> Insignias { get; set; }
|
|
|
|
public DbSet<Province> Provinces { get; set; }
|
|
|
|
public DbSet<District> Districts { get; set; }
|
|
|
|
public DbSet<SubDistrict> SubDistricts { get; set; }
|
|
|
|
public DbSet<Holiday> Holidays { get; set; }
|
|
|
|
public DbSet<OrganizationType> OrganizationTypes { get; set; }
|
|
|
|
public DbSet<OrganizationLevel> OrganizationLevels { get; set; }
|
|
|
|
public DbSet<OrganizationOrganization> OrganizationOrganizations { get; set; }
|
|
|
|
public DbSet<OrganizationShortName> OrganizationShortNames { get; set; }
|
|
|
|
public DbSet<OrganizationStatus> OrganizationStatuses { get; set; }
|
|
|
|
public DbSet<OrganizationAgency> OrganizationAgencys { get; set; }
|
|
|
|
public DbSet<OrganizationGovernmentAgency> OrganizationGovernmentAgencys { get; set; }
|
|
|
|
public DbSet<OrganizationTelExternal> OrganizationTelExternals { get; set; }
|
|
|
|
public DbSet<OrganizationTelInternal> OrganizationTelInternals { get; set; }
|
|
|
|
public DbSet<OrganizationFax> OrganizationFaxs { get; set; }
|
|
|
|
public DbSet<RoyalHierarchy> RoyalHierarchys { get; set; }
|
|
|
|
public DbSet<RoyalType> RoyalTypes { get; set; }
|
|
|
|
public DbSet<Royal> Royals { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Documents "
|
|
|
|
public DbSet<Document> Documents { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Organizations "
|
|
|
|
public DbSet<AvailablePositionLevelEntity> AvailablePositionLevels { get; set; }
|
|
|
|
public DbSet<PositionMasterEntity> PositionMasters { get; set; }
|
|
|
|
public DbSet<OrganizationEntity> Organizations { get; set; }
|
|
|
|
public DbSet<PositionNumberEntity> PositionNumbers { get; set; }
|
|
|
|
public DbSet<OrganizationPositionEntity> OrganizationPositions { get; set; }
|
|
|
|
public DbSet<ProfilePosition> ProfilePositions { get; set; }
|
|
|
|
public DbSet<Report2> Report2s { get; set; }
|
|
|
|
public DbSet<Report2History> Report2Histories { get; set; }
|
|
|
|
public DbSet<Report2DetailHistory> Report2DetailHistories { get; set; }
|
|
|
|
public DbSet<OrganizationPublishHistoryEntity> OrganizationPublishHistories { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " HR "
|
|
|
|
public DbSet<Profile> Profiles { get; set; }
|
|
|
|
public DbSet<ProfileEducation> ProfileEducations { get; set; }
|
|
|
|
public DbSet<ProfileEducationHistory> ProfileEducationHistorys { get; set; }
|
|
|
|
public DbSet<ProfileHonor> ProfileHonors { get; set; }
|
|
|
|
public DbSet<ProfileHonorHistory> ProfileHonorHistorys { get; set; }
|
|
|
|
public DbSet<ProfileAssessment> ProfileAssessments { get; set; }
|
|
|
|
public DbSet<ProfileAssessmentHistory> ProfileAssessmentHistorys { get; set; }
|
|
|
|
public DbSet<ProfileDiscipline> ProfileDisciplines { get; set; }
|
|
|
|
public DbSet<ProfileDisciplineHistory> ProfileDisciplineHistorys { get; set; }
|
|
|
|
public DbSet<ProfileCertificate> ProfileCertificates { get; set; }
|
|
|
|
public DbSet<ProfileCertificateHistory> ProfileCertificateHistorys { get; set; }
|
|
|
|
public DbSet<ProfileTraining> ProfileTrainings { get; set; }
|
|
|
|
public DbSet<ProfileTrainingHistory> ProfileTrainingHistorys { get; set; }
|
|
|
|
public DbSet<ProfileInsignia> ProfileInsignias { get; set; }
|
|
|
|
public DbSet<ProfileInsigniaHistory> ProfileInsigniaHistorys { get; set; }
|
|
|
|
public DbSet<ProfileSalary> ProfileSalaries { get; set; }
|
|
|
|
public DbSet<ProfileSalaryHistory> ProfileSalaryHistories { get; set; }
|
|
|
|
public DbSet<ProfileSalaryOrganization> ProfileSalaryOrganizations { get; set; }
|
|
|
|
public DbSet<ProfileSalaryPosition> ProfileSalaryPositions { get; set; }
|
|
|
|
public DbSet<ProfileSalaryPositionNumber> ProfileSalaryPositionsNumbers { get; set; }
|
|
|
|
public DbSet<ProfileHistory> ProfileHistory { get; set; }
|
|
|
|
public DbSet<ProfileCoupleHistory> ProfileCoupleHistory { get; set; }
|
|
|
|
public DbSet<ProfileFatherHistory> ProfileFatherHistory { get; set; }
|
|
|
|
public DbSet<ProfileMotherHistory> ProfileMotherHistory { get; set; }
|
|
|
|
public DbSet<ProfileFamilyHistory> ProfileFamilyHistory { get; set; }
|
|
|
|
public DbSet<ProfileGovernmentHistory> ProfileGovernmentHistory { get; set; }
|
|
|
|
public DbSet<ProfileLeave> ProfileLeaves { get; set; }
|
|
|
|
public DbSet<ProfileLeaveHistory> ProfileLeaveHistorys { get; set; }
|
|
|
|
public DbSet<ProfileSalaryPositionLevel> ProfileSalaryPositionLevels { get; set; }
|
|
|
|
public DbSet<ProfileSalaryPositionType> ProfileSalaryPositionTypes { get; set; }
|
|
|
|
public DbSet<ProfileChildren> ProfileChildrens { get; set; }
|
|
|
|
public DbSet<ProfileChildrenHistory> ProfileChildrenHistories { get; set; }
|
|
|
|
public DbSet<ProfilePaper> ProfilePapers { get; set; }
|
|
|
|
public DbSet<ProfileCurrentAddressHistory> ProfileCurrentAddressHistories { get; set; }
|
|
|
|
public DbSet<ProfileRegistrationAddressHistory> ProfileRegistrationAddressHistories { get; set; }
|
|
|
|
public DbSet<ProfileAddressHistory> ProfileAddressHistories { get; set; }
|
|
|
|
public DbSet<ProfileOther> ProfileOthers { get; set; }
|
|
|
|
public DbSet<ProfileOtherHistory> ProfileOtherHistorys { get; set; }
|
|
|
|
public DbSet<ProfileAbility> ProfileAbilitys { get; set; }
|
|
|
|
public DbSet<ProfileAbilityHistory> ProfileAbilityHistorys { get; set; }
|
|
|
|
public DbSet<ProfileDuty> ProfileDutys { get; set; }
|
|
|
|
public DbSet<ProfileDutyHistory> ProfileDutyHistorys { get; set; }
|
|
|
|
public DbSet<ProfileNopaid> ProfileNopaids { get; set; }
|
|
|
|
public DbSet<ProfileNopaidHistory> ProfileNopaidHistorys { get; set; }
|
|
|
|
public DbSet<ProfileAvatarHistory> ProfileAvatarHistories { get; set; }
|
|
|
|
public DbSet<ProfileOrganization> ProfileOrganizations { get; set; }
|
|
|
|
public DbSet<ProfileChangeName> ProfileChangeNames { get; set; }
|
|
|
|
public DbSet<ProfileChangeNameHistory> ProfileChangeNameHistorys { get; set; }
|
|
|
|
public DbSet<TypeLeave> TypeLeaves { get; set; }
|
|
|
|
public DbSet<LimitLeave> LimitLeaves { get; set; }
|
|
|
|
public DbSet<LimitTypeLeave> LimitTypeLeaves { get; set; }
|
|
|
|
public DbSet<ProfileEmployment> ProfileEmployments { get; set; }
|
|
|
|
public DbSet<ProfileEmploymentHistory> ProfileEmploymentHistorys { get; set; }
|
|
|
|
public DbSet<ProfileLeaveSummary> ProfileLeaveSummary { get; set; }
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region " Placements "
|
|
|
|
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<PlacementProfileDoc> PlacementProfileDocs { get; set; }
|
|
public DbSet<PlacementType> PlacementTypes { get; set; }
|
|
public DbSet<PlacementTransfer> PlacementTransfers { get; set; }
|
|
public DbSet<PlacementReceive> PlacementReceives { get; set; }
|
|
public DbSet<PlacementRelocation> PlacementRelocations { get; set; }
|
|
public DbSet<PlacementAppointment> PlacementAppointments { get; set; }
|
|
public DbSet<PlacementTransferDoc> PlacementTransferDocs { get; set; }
|
|
public DbSet<PlacementReceiveDoc> PlacementReceiveDocs { get; set; }
|
|
public DbSet<PlacementRelocationDoc> PlacementRelocationDocs { get; set; }
|
|
public DbSet<PlacementAppointmentDoc> PlacementAppointmentDocs { get; set; }
|
|
public DbSet<PlacementOfficer> PlacementOfficers { get; set; }
|
|
public DbSet<PlacementRepatriation> PlacementRepatriations { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " OrganizationEmployee "
|
|
|
|
public DbSet<OrgEmployee> OrganizationEmployees { get; set; }
|
|
public DbSet<OrganizationEmployeeProfile> OrganizationEmployeeProfiles { get; set; }
|
|
public DbSet<OrganizationPositionEmployeeLevel> OrganizationPositionEmployeeLevels { get; set; }
|
|
public DbSet<OrganizationPositionEmployeePositionSide> OrganizationPositionEmployeePositionSides { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Command "
|
|
|
|
public DbSet<CommandStatus> CommandStatuses { get; set; }
|
|
|
|
public DbSet<CommandType> CommandTypes { get; set; }
|
|
|
|
public DbSet<CommandDocument> CommandDocuments { get; set; }
|
|
|
|
public DbSet<DeploymentChannel> DeploymentChannels { get; set; }
|
|
|
|
public DbSet<Command> Commands { get; set; }
|
|
|
|
public DbSet<CommandDeployment> CommandDeployments { get; set; }
|
|
|
|
public DbSet<CommandReceiver> CommandReceivers { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Message Queue "
|
|
|
|
public DbSet<MessageQueueEntity> MessageQueues { get; set; }
|
|
|
|
public DbSet<Inbox> Inboxes { get; set; }
|
|
|
|
public DbSet<Notification> Notifications { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Insignia "
|
|
|
|
public DbSet<InsigniaPeriod> InsigniaPeriods { get; set; }
|
|
public DbSet<InsigniaRequest> InsigniaRequests { get; set; }
|
|
public DbSet<InsigniaRequestProfile> InsigniaRequestProfiles { get; set; }
|
|
public DbSet<InsigniaManage> InsigniaManages { get; set; }
|
|
public DbSet<InsigniaNoteProfile> InsigniaNoteProfiles { get; set; }
|
|
public DbSet<InsigniaNote> InsigniaNotes { get; set; }
|
|
public DbSet<InsigniaNoteDoc> InsigniaNoteDocs { get; set; }
|
|
public DbSet<InsigniaManageOrganiation> InsigniaManageOrganiations { get; set; }
|
|
public DbSet<InsigniaManageProfile> InsigniaManageProfiles { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Retirement "
|
|
|
|
public DbSet<RetirementPeriodHistory> RetirementPeriodHistorys { get; set; }
|
|
public DbSet<RetirementPeriod> RetirementPeriods { get; set; }
|
|
public DbSet<RetirementProfile> RetirementProfiles { get; set; }
|
|
public DbSet<RetirementDeceased> RetirementDeceaseds { get; set; }
|
|
public DbSet<RetirementDeceasedNoti> RetirementDeceasedNotis { get; set; }
|
|
public DbSet<RetirementResign> RetirementResigns { get; set; }
|
|
public DbSet<RetirementResignDoc> RetirementResignDocs { get; set; }
|
|
public DbSet<RetirementOut> RetirementOuts { get; set; }
|
|
public DbSet<RetirementDischarge> RetirementDischarges { get; set; }
|
|
public DbSet<RetirementExpulsion> RetirementExpulsions { get; set; }
|
|
public DbSet<RetirementOther> RetirementOthers { get; set; }
|
|
public DbSet<RetirementOtherDoc> RetirementOtherDocs { get; set; }
|
|
public DbSet<RetirementQuestion> RetirementQuestions { get; set; }
|
|
public DbSet<RetirementQuestionnaireQuestion> RetirementQuestionnaireQuestions { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region " Probation "
|
|
|
|
public DbSet<CronjobNotiProbation> CronjobNotiProbations { get; set; }
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
public ApplicationDBContext(DbContextOptions<ApplicationDBContext> options) : base(options)
|
|
{
|
|
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
// meta data service
|
|
modelBuilder.Entity<BloodGroup>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<District>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<EducationLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Gender>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Holiday>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Insignia>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<InsigniaType>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationAgency>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationFax>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationGovernmentAgency>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationOrganization>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationShortName>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationStatus>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationTelExternal>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationTelInternal>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationType>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PhysicalStatus>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Position>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeeGroup>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeeLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeeLine>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeePosition>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeePositionSide>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionEmployeeStatus>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionExecutive>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionExecutiveSide>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionLine>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionPath>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionPathSide>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionStatus>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionType>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Prefix>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Province>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Relationship>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Religion>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Royal>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<RoyalHierarchy>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<RoyalType>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<SubDistrict>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
|
|
// Document
|
|
modelBuilder.Entity<Document>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
|
|
// Organization Service
|
|
modelBuilder.Entity<AvailablePositionLevelEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrgEmployee>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationEmployeeProfile>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationPositionEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionMasterEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<PositionNumberEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfilePosition>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
|
|
modelBuilder.Entity<Report2>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Report2History>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Report2DetailHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<OrganizationPublishHistoryEntity>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
|
|
// HR
|
|
modelBuilder.Entity<LimitLeave>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<LimitTypeLeave>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<Profile>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAbility>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAbilityHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAddressHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAssessment>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAssessmentHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileAvatarHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileCertificate>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileCertificateHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileChangeName>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileChangeNameHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileChildren>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileChildrenHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileCoupleHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileCurrentAddressHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileDiscipline>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileDisciplineHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileDuty>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileDutyHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileEducation>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileEducationHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileEmployment>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileEmploymentHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileFamilyHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileFatherHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileGovernmentHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileHonor>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileHonorHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileInsignia>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileInsigniaHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileLeave>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileLeaveHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileLeaveSummary>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileMotherHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileNopaid>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileNopaidHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileOrganization>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileOther>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileOtherHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfilePaper>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileRegistrationAddressHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalary>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryOrganization>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryPosition>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryPositionLevel>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryPositionNumber>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileSalaryPositionType>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileTraining>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<ProfileTrainingHistory>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
modelBuilder.Entity<TypeLeave>().Metadata.SetIsTableExcludedFromMigrations(true);
|
|
}
|
|
|
|
public Task<int> SaveChangesAsync()
|
|
{
|
|
return base.SaveChangesAsync();
|
|
}
|
|
|
|
public void Attatch<T>(T entity) where T : class
|
|
{
|
|
Attach(entity);
|
|
}
|
|
}
|
|
}
|