From 27e9cadf919bd7606b625af7ad1c37ad81979fe1 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 12 Oct 2023 13:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=A1=B9=E7=9B=AE=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=8C=85=EF=BC=8C=E6=B8=85=E7=90=86=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API.sln | 30 ----- .../Controllers/ExtraController.cs | 3 - IRaCIS.Core.API/IRaCIS.Core.API.csproj | 29 ++--- IRaCIS.Core.API/IRaCIS.Core.API.xml | 108 ------------------ IRaCIS.Core.API/Startup.cs | 4 +- .../_ServiceExtensions/AutofacModuleSetup.cs | 20 +--- .../MiniProfilerConfigure.cs | 81 ------------- .../IRaCIS.Core.Application.csproj | 43 ++++--- .../ImageAndDoc/DicomArchiveService.cs | 6 +- .../Reading/Dto/ReadingMedicalReviewDto.cs | 8 +- .../Allocation/TaskMedicalReview.cs | 10 +- IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj | 6 +- .../ReadingMedicalReviewDialog.cs | 8 +- IRaCIS.Core.Domain/Visit/SubjectVisit.cs | 2 +- .../ClinicalFromConfigration.cs | 27 ----- .../EntityConfigration/DoctorConfigration.cs | 20 +--- .../IRaCIS.Core.Infra.EFCore.csproj | 10 +- IRaCIS.Core.Test/IRaCIS.Core.Test.csproj | 1 - 18 files changed, 63 insertions(+), 353 deletions(-) delete mode 100644 IRaCIS.Core.API/_ServiceExtensions/MiniProfilerConfigure.cs delete mode 100644 IRaCIS.Core.Infra.EFCore/EntityConfigration/ClinicalFromConfigration.cs diff --git a/IRaCIS.Core.API.sln b/IRaCIS.Core.API.sln index cb23da7dd..d5afa55fa 100644 --- a/IRaCIS.Core.API.sln +++ b/IRaCIS.Core.API.sln @@ -11,25 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Application", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Domain.Share", "IRaCIS.Core.Domain.Share\IRaCIS.Core.Domain.Share.csproj", "{7CBC76F5-3817-46B7-8D9D-79253A89B578}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.JWT.RS256", "ZhiZhunAuthenticationCenter\IRaCIS.JWT.RS256.csproj", "{3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Test", "IRaCIS.Core.Test\IRaCIS.Core.Test.csproj", "{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infra.EFCore", "IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj", "{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infrastructure", "IRaCIS.Core.Infrastructure\IRaCIS.Core.Infrastructure.csproj", "{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IRaCIS.AuthenticationCenter", "IRaCIS.AuthenticationCenter", "{481329D6-B8A0-491F-A398-1DF66A0FBB62}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4", "IRaCIS.Core.IdentityServer4\IRaCIS.Core.IdentityServer4.csproj", "{C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.IdentityServer4.MVC", "IRaCIS.Core.IdentityServer4.MVC\IRaCIS.Core.IdentityServer4.MVC.csproj", "{F621ADD6-94E8-4A4B-998E-25B8EF15D39C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F852ABFB-88AC-48BE-B876-2228BE2373D6}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -52,10 +39,6 @@ Global {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.Build.0 = Release|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39}.Release|Any CPU.Build.0 = Release|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU {3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -68,23 +51,10 @@ Global {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Debug|Any CPU.Build.0 = Debug|Any CPU {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.ActiveCfg = Release|Any CPU {07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.Build.0 = Release|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674}.Release|Any CPU.Build.0 = Release|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {3EF210EE-D5D1-4C93-A8FA-E0DB1852BD39} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - {C3DD48CF-B8B3-40F6-9BDB-B7C7F0851674} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - {F621ADD6-94E8-4A4B-998E-25B8EF15D39C} = {481329D6-B8A0-491F-A398-1DF66A0FBB62} - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BCC2EB19-3914-489B-B1D7-B7303E0218A3} EndGlobalSection diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index 15ec0a88b..ca49c5e0b 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -1,9 +1,6 @@ using System; using System.Net.Http; using EasyCaching.Core; -using gRPC.ZHiZHUN.AuthServer.protos; -using Grpc.Net.Client; -using Grpc.Net.Client.Configuration; using IRaCIS.Application.Interfaces; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Auth; diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index 248060a76..787cd194b 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -66,34 +66,27 @@ - - + + - + - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + true + - - - - - - + + + + - + diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 50413058f..d07789653 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -490,113 +490,5 @@ - - Holder for reflection information generated from Protos/GrpcToken.proto - - - File descriptor for Protos/GrpcToken.proto - - - - 新增用户时需要传递数据消息, 可理解为一个类 - - - - Field number for the "id" field. - - - Field number for the "userName" field. - - - Field number for the "realName" field. - - - Field number for the "reviewerCode" field. - - - Field number for the "userTypeEnumInt" field. - - - Field number for the "userTypeShortName" field. - - - Field number for the "isAdmin" field. - - - - 新增时返回的消息格式 - - - - Field number for the "code" field. - - - Field number for the "token" field. - - - - service 用标识定义服务的,里面写对应的方法 - - - - Service descriptor - - - Client for TokenGrpcService - - - Creates a new client for TokenGrpcService - The channel to use to make remote calls. - - - Creates a new client for TokenGrpcService that uses a custom CallInvoker. - The callInvoker to use to make remote calls. - - - Protected parameterless constructor to allow creation of test doubles. - - - Protected constructor to allow creation of configured clients. - The client configuration. - - - - 获取token - - The request to send to the server. - The initial metadata to send with the call. This parameter is optional. - An optional deadline for the call. The call will be cancelled if deadline is hit. - An optional token for canceling the call. - The response received from the server. - - - - 获取token - - The request to send to the server. - The options for the call. - The response received from the server. - - - - 获取token - - The request to send to the server. - The initial metadata to send with the call. This parameter is optional. - An optional deadline for the call. The call will be cancelled if deadline is hit. - An optional token for canceling the call. - The call object. - - - - 获取token - - The request to send to the server. - The options for the call. - The call object. - - - Creates a new instance of client from given ClientBaseConfiguration. - diff --git a/IRaCIS.Core.API/Startup.cs b/IRaCIS.Core.API/Startup.cs index 83255d47a..21772cf98 100644 --- a/IRaCIS.Core.API/Startup.cs +++ b/IRaCIS.Core.API/Startup.cs @@ -108,8 +108,10 @@ namespace IRaCIS.Core.API services.AddSwaggerSetup(); //JWT Token ֤ services.AddJWTAuthSetup(_configuration); + + // MediatR Ϣ ¼ ӳ עhandlerӦϵ - services.AddMediatR(typeof(ConsistencyVerificationHandler).Assembly); + services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining()); // EasyCaching services.AddEasyCachingSetup(_configuration); diff --git a/IRaCIS.Core.API/_ServiceExtensions/AutofacModuleSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/AutofacModuleSetup.cs index fd321596e..3435a738a 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/AutofacModuleSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/AutofacModuleSetup.cs @@ -31,10 +31,6 @@ namespace IRaCIS.Core.API containerBuilder.RegisterType().As().InstancePerLifetimeScope(); - //containerBuilder.RegisterType().As().InstancePerLifetimeScope(); - - //containerBuilder.RegisterGeneric(typeof(EFUnitOfWork<>)) - // .As(typeof(IEFUnitOfWork<>)).InstancePerLifetimeScope();//注册仓储 #endregion @@ -50,8 +46,7 @@ namespace IRaCIS.Core.API #endregion - //containerBuilder.RegisterType().As().PropertiesAutowired().InstancePerLifetimeScope(); - //containerBuilder.RegisterType().As().InstancePerLifetimeScope(); + @@ -59,22 +54,13 @@ namespace IRaCIS.Core.API containerBuilder.RegisterAssemblyTypes(application).Where(t => t.FullName.Contains("Service")) .PropertiesAutowired().AsImplementedInterfaces().EnableClassInterceptors(); - //Assembly infrastructure = Assembly.Load("IRaCIS.Core.Infra.EFCore"); - //containerBuilder.RegisterAssemblyTypes(infrastructure).AsImplementedInterfaces(); + containerBuilder.RegisterType().As().SingleInstance(); containerBuilder.RegisterType().As().InstancePerLifetimeScope(); - //containerBuilder.RegisterType().InstancePerLifetimeScope(); - //Autofac 注册拦截器 需要注意的是生成api上服务上的动态代理AOP失效 间接掉用不影响 - //containerBuilder.RegisterType(); - //containerBuilder.RegisterType(); - //containerBuilder.RegisterType(); - //containerBuilder.RegisterType().As().SingleInstance(); - - - //注册hangfire任务 依赖注入 + //注册hangfire任务 依赖注入 containerBuilder.RegisterType().As().InstancePerDependency(); diff --git a/IRaCIS.Core.API/_ServiceExtensions/MiniProfilerConfigure.cs b/IRaCIS.Core.API/_ServiceExtensions/MiniProfilerConfigure.cs deleted file mode 100644 index f08e27aae..000000000 --- a/IRaCIS.Core.API/_ServiceExtensions/MiniProfilerConfigure.cs +++ /dev/null @@ -1,81 +0,0 @@ -//using System; -//using Microsoft.Extensions.DependencyInjection; -//using StackExchange.Profiling.Storage; - -//namespace IRaCIS.Core.API -//{ -// public class MiniProfilerConfigure -// { -// public static void ConfigureMiniProfiler(IServiceCollection services) -// { - -// services.AddMiniProfiler(options => -// { -// // All of this is optional. You can simply call .AddMiniProfiler() for all defaults - -// // (Optional) Path to use for profiler URLs, default is /mini-profiler-resources -// options.RouteBasePath = "/profiler"; - -// //// (Optional) Control storage -// //// (default is 30 minutes in MemoryCacheStorage) -// (options.Storage as MemoryCacheStorage).CacheDuration = TimeSpan.FromMinutes(10); - -// //// (Optional) Control which SQL formatter to use, InlineFormatter is the default -// //options.SqlFormatter = new StackExchange.Profiling.SqlFormatters.InlineFormatter(); - -// //// (Optional) To control authorization, you can use the Func options: -// //// (default is everyone can access profilers) -// //options.ResultsAuthorize = request => MyGetUserFunction(request).CanSeeMiniProfiler; -// //options.ResultsListAuthorize = request => MyGetUserFunction(request).CanSeeMiniProfiler; -// //// Or, there are async versions available: -// //options.ResultsAuthorizeAsync = async request => (await MyGetUserFunctionAsync(request)).CanSeeMiniProfiler; -// //options.ResultsAuthorizeListAsync = async request => (await MyGetUserFunctionAsync(request)).CanSeeMiniProfilerLists; - -// //// (Optional) To control which requests are profiled, use the Func option: -// //// (default is everything should be profiled) -// //options.ShouldProfile = request => MyShouldThisBeProfiledFunction(request); - -// //// (Optional) Profiles are stored under a user ID, function to get it: -// //// (default is null, since above methods don't use it by default) -// //options.UserIdProvider = request => MyGetUserIdFunction(request); - -// //// (Optional) Swap out the entire profiler provider, if you want -// //// (default handles async and works fine for almost all applications) -// //options.ProfilerProvider = new MyProfilerProvider(); - -// //// (Optional) You can disable "Connection Open()", "Connection Close()" (and async variant) tracking. -// //// (defaults to true, and connection opening/closing is tracked) -// //options.TrackConnectionOpenClose = true; - -// //// (Optional) Use something other than the "light" color scheme. -// //// (defaults to "light") -// //options.ColorScheme = StackExchange.Profiling.ColorScheme.Auto; - -// //// The below are newer options, available in .NET Core 3.0 and above: - -// //// (Optional) You can disable MVC filter profiling -// //// (defaults to true, and filters are profiled) -// //options.EnableMvcFilterProfiling = true; -// //// ...or only save filters that take over a certain millisecond duration (including their children) -// //// (defaults to null, and all filters are profiled) -// //// options.MvcFilterMinimumSaveMs = 1.0m; - -// //// (Optional) You can disable MVC view profiling -// //// (defaults to true, and views are profiled) -// //options.EnableMvcViewProfiling = true; -// //// ...or only save views that take over a certain millisecond duration (including their children) -// //// (defaults to null, and all views are profiled) -// //// options.MvcViewMinimumSaveMs = 1.0m; - -// //// (Optional) listen to any errors that occur within MiniProfiler itself -// //// options.OnInternalError = e => MyExceptionLogger(e); - -// //// (Optional - not recommended) You can enable a heavy debug mode with stacks and tooltips when using memory storage -// //// It has a lot of overhead vs. normal profiling and should only be used with that in mind -// //// (defaults to false, debug/heavy mode is off) -// ////options.EnableDebugMode = true; -// }); -// //.AddEntityFramework(); -// } -// } -//} \ No newline at end of file diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj index 7a5d93102..aa9a82bba 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj @@ -64,6 +64,9 @@ + + + @@ -74,37 +77,31 @@ + + true + + + true - - - - - + true - - true - - - - - - true - - - - + + + + + + true - - - - - - + + + + + diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs index 9b990c306..9d9bd7cc6 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs @@ -1,6 +1,4 @@ -using Dicom; -using Dicom.Imaging.Codec; -using EasyCaching.Core; +using EasyCaching.Core; using IRaCIS.Core.Application.Contracts.Dicom; using IRaCIS.Core.Domain.Share; using System.Text; @@ -9,6 +7,8 @@ using IRaCIS.Core.Application.Helper; using Microsoft.AspNetCore.Hosting; using IRaCIS.Core.Infrastructure; using Medallion.Threading; +using FellowOakDicom; +using FellowOakDicom.Imaging.Codec; namespace IRaCIS.Core.Application.Services { diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index 95784d2ff..9cb77bc89 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -262,7 +262,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string ImagePath { get; set; } = string.Empty; - public List FileList { get; set; } = new List(); + public List FileList { get; set; } = new List(); } @@ -310,7 +310,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto - public List FileList { get; set; } = new List(); + public List FileList { get; set; } = new List(); @@ -451,7 +451,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid TaskMedicalReviewId { get; set; } - public List FileList { get; set; } = new List(); + public List FileList { get; set; } = new List(); /// @@ -498,7 +498,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string Questioning { get; set; } = string.Empty; - public List FileList { get; set; } = new List(); + public List FileList { get; set; } = new List(); /// /// 审核建议 diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 7c77ea807..901e4c984 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -178,7 +178,7 @@ namespace IRaCIS.Core.Domain.Models /// 文件 /// [NotMapped] - public List FileList + public List FileList { get { @@ -186,13 +186,13 @@ namespace IRaCIS.Core.Domain.Models try { - var result= JsonConvert.DeserializeObject>(this.ImagePath); - return result==null?new List() : result; + var result= JsonConvert.DeserializeObject>(this.ImagePath); + return result==null?new List() : result; } catch (Exception) { - return new List(); + return new List(); } } @@ -210,7 +210,7 @@ namespace IRaCIS.Core.Domain.Models #region 文件对象 - public class ImageInfo + public class OSSImageInfo { public string FileName { get; set; } diff --git a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj index 5cbdf014a..f9c01aaf3 100644 --- a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj +++ b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj @@ -9,11 +9,7 @@ - - - - - + diff --git a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs index c3f46259f..e00db79c7 100644 --- a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs +++ b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs @@ -113,7 +113,7 @@ namespace IRaCIS.Core.Domain.Models /// 文件 /// [NotMapped] - public List FileList + public List FileList { get { @@ -121,13 +121,13 @@ namespace IRaCIS.Core.Domain.Models try { - var result = JsonConvert.DeserializeObject>(this.ImagePath); - return result == null ? new List() : result; + var result = JsonConvert.DeserializeObject>(this.ImagePath); + return result == null ? new List() : result; } catch (Exception) { - return new List(); + return new List(); } } diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index cf80c30b2..7b44926ef 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using IRaCIS.Core.Domain.Share; -using Microsoft.EntityFrameworkCore.Metadata.Internal; + namespace IRaCIS.Core.Domain.Models { diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ClinicalFromConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/ClinicalFromConfigration.cs deleted file mode 100644 index 98b711e7a..000000000 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ClinicalFromConfigration.cs +++ /dev/null @@ -1,27 +0,0 @@ -using IRaCIS.Core.Domain.Models; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace IRaCIS.Core.Infra.EFCore.EntityConfigration -{ - //public class ClinicalFromConfigration : IEntityTypeConfiguration - //{ - - - // public void Configure(EntityTypeBuilder builder) - // { - // builder - // .HasOne(s => s.ReadingClinicalData) - // .WithMany(c => c.ClinicalFormList) - // .HasForeignKey(s => new { s.SubjectId, s.ReadingId }) - // .HasPrincipalKey(c => new { c.SubjectId, c.ReadingId }); - // } - - - //} -} diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs index bac14118a..a0d0f1744 100644 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs +++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs @@ -26,31 +26,17 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration } - //public class DoctorTaskConfigration : IEntityTypeConfiguration - //{ - // public void Configure(EntityTypeBuilder builder) - // { - // builder - // .HasOne(dd => dd.DoctorUser) - // .WithMany(p => p.VisitTaskList) - // .HasForeignKey(dd => dd.DoctorUserId); - - - // } - - - //} - public class DictionaryConfigration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { - builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore); - builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + + //builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore); + // builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); } } diff --git a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj index df6df308d..ccebbacad 100644 --- a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj +++ b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj @@ -17,13 +17,13 @@ - - - + + - - + + + diff --git a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj index 5f49abc87..16b11378d 100644 --- a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj +++ b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj @@ -15,7 +15,6 @@ - all