diff --git a/BMA.EHR.Application/Repositories/PrefixRepository.cs b/BMA.EHR.Application/Repositories/PrefixRepository.cs index 1b6a2b15..2e540744 100644 --- a/BMA.EHR.Application/Repositories/PrefixRepository.cs +++ b/BMA.EHR.Application/Repositories/PrefixRepository.cs @@ -1,11 +1,12 @@ using BMA.EHR.Application.Common.Interfaces; +using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.MetaData; using Microsoft.AspNetCore.Http; using System.Security.AccessControl; namespace BMA.EHR.Application.Repositories { - public class PrefixRepository : GenericRepository + public class PrefixRepository : GenericRepository { private readonly IApplicationDBContext _dbContext; private readonly IHttpContextAccessor _httpContextAccessor; diff --git a/BMA.EHR.Domain/Models/Documents/Document.cs b/BMA.EHR.Domain/Models/Documents/Document.cs index 82bf5cc9..98a119a4 100644 --- a/BMA.EHR.Domain/Models/Documents/Document.cs +++ b/BMA.EHR.Domain/Models/Documents/Document.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace BMA.EHR.Profile.Service.Models.Documents +namespace BMA.EHR.Domain.Models.Documents { public class Document { diff --git a/BMA.EHR.Domain/Models/HR/Profile.cs b/BMA.EHR.Domain/Models/HR/Profile.cs index 04043cd4..d406c038 100644 --- a/BMA.EHR.Domain/Models/HR/Profile.cs +++ b/BMA.EHR.Domain/Models/HR/Profile.cs @@ -1,7 +1,7 @@ -using BMA.EHR.Profile.Service.Models.Documents; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using Microsoft.EntityFrameworkCore; using BMA.EHR.Domain.Models.Base; +using BMA.EHR.Domain.Models.Documents; namespace BMA.EHR.Profile.Service.Models.HR { diff --git a/BMA.EHR.Domain/Models/HR/ProfileAvatarHistory.cs b/BMA.EHR.Domain/Models/HR/ProfileAvatarHistory.cs index 27ab1f94..8da7e4ba 100644 --- a/BMA.EHR.Domain/Models/HR/ProfileAvatarHistory.cs +++ b/BMA.EHR.Domain/Models/HR/ProfileAvatarHistory.cs @@ -1,7 +1,6 @@ -using BMA.EHR.Profile.Service.Models.Documents; -using System.ComponentModel.DataAnnotations; +using BMA.EHR.Domain.Models.Base; +using BMA.EHR.Domain.Models.Documents; using Microsoft.EntityFrameworkCore; -using BMA.EHR.Domain.Models.Base; namespace BMA.EHR.Profile.Service.Models.HR { diff --git a/BMA.EHR.Domain/Models/HR/ProfileChangeName.cs b/BMA.EHR.Domain/Models/HR/ProfileChangeName.cs index c4c1048a..928d1f62 100644 --- a/BMA.EHR.Domain/Models/HR/ProfileChangeName.cs +++ b/BMA.EHR.Domain/Models/HR/ProfileChangeName.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using BMA.EHR.Domain.Models.Base; +using BMA.EHR.Domain.Models.Documents; using Microsoft.EntityFrameworkCore; -using BMA.EHR.Profile.Service.Models.Documents; -using BMA.EHR.Domain.Models.Base; +using System.ComponentModel.DataAnnotations; namespace BMA.EHR.Profile.Service.Models.HR { diff --git a/BMA.EHR.Domain/Models/HR/ProfileChangeNameHistory.cs b/BMA.EHR.Domain/Models/HR/ProfileChangeNameHistory.cs index 18562565..fdfac89d 100644 --- a/BMA.EHR.Domain/Models/HR/ProfileChangeNameHistory.cs +++ b/BMA.EHR.Domain/Models/HR/ProfileChangeNameHistory.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using BMA.EHR.Domain.Models.Base; +using BMA.EHR.Domain.Models.Documents; using Microsoft.EntityFrameworkCore; -using BMA.EHR.Profile.Service.Models.Documents; -using BMA.EHR.Domain.Models.Base; +using System.ComponentModel.DataAnnotations; namespace BMA.EHR.Profile.Service.Models.HR { diff --git a/BMA.EHR.Domain/Models/HR/ProfileOrganization.cs b/BMA.EHR.Domain/Models/HR/ProfileOrganization.cs index 50873ee2..70c4c58a 100644 --- a/BMA.EHR.Domain/Models/HR/ProfileOrganization.cs +++ b/BMA.EHR.Domain/Models/HR/ProfileOrganization.cs @@ -1,7 +1,5 @@ -using BMA.EHR.Profile.Service.Models.Documents; -using System.ComponentModel.DataAnnotations; +using BMA.EHR.Domain.Models.Base; using Microsoft.EntityFrameworkCore; -using BMA.EHR.Domain.Models.Base; namespace BMA.EHR.Profile.Service.Models.HR { diff --git a/BMA.EHR.Domain/Models/HR/ProfilePaper.cs b/BMA.EHR.Domain/Models/HR/ProfilePaper.cs index 216b61e1..41cda1f7 100644 --- a/BMA.EHR.Domain/Models/HR/ProfilePaper.cs +++ b/BMA.EHR.Domain/Models/HR/ProfilePaper.cs @@ -1,5 +1,5 @@ using BMA.EHR.Domain.Models.Base; -using BMA.EHR.Profile.Service.Models.Documents; +using BMA.EHR.Domain.Models.Documents; using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; diff --git a/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj b/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj index e355a7c5..3ad1be21 100644 --- a/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj +++ b/BMA.EHR.Infrastructure/BMA.EHR.Infrastructure.csproj @@ -15,6 +15,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs b/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs index 6fbdab9e..fadf6b47 100644 --- a/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs +++ b/BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs @@ -1,4 +1,5 @@ using BMA.EHR.Application.Common.Interfaces; +using BMA.EHR.Domain.Models.Documents; using BMA.EHR.Domain.Models.MetaData; using Microsoft.EntityFrameworkCore; @@ -94,67 +95,18 @@ namespace BMA.EHR.Infrastructure.Persistence #endregion + #region " Documents " + + public DbSet Documents { get; set; } + + #endregion + #endregion public ApplicationDBContext(DbContextOptions options) : base(options) { } - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - - - //Ignore Existing table from other service - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - //modelBuilder.Ignore(); - - base.OnModelCreating(modelBuilder); - } - - public override DbSet Set() where TEntity : class - { - return base.Set(); - } - public Task SaveChangesAsync() { return base.SaveChangesAsync();