diff --git a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs index 6c679d676..7330c7493 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs @@ -27,7 +27,7 @@ namespace IRaCIS.Core.API options.AddInterceptors(new QueryWithNoLockDbCommandInterceptor()); - options.UseProjectables(); + //options.UseProjectables(); //options.AddInterceptors(new AuditingInterceptor(configuration.GetSection("ConnectionStrings:RemoteNew").Value)); diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 5e0bf334f..6de525061 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -63,6 +63,9 @@ namespace IRaCIS.Application.Services [AllowAnonymous] public async Task TestDistributedLock( ) { + + _repository.Where().Select(t => t.FullName).FirstOrDefault(); + Console.WriteLine($"我进来了当前值是:" + IntValue); _logger.LogWarning($"我进来了当前值是:" + IntValue); diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 263ac8f46..4fa044f69 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -9,7 +9,6 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Collections.Generic; using System.Linq; -using EntityFrameworkCore.Projectables; namespace IRaCIS.Core.Domain.Models { @@ -324,7 +323,7 @@ namespace IRaCIS.Core.Domain.Models public Guid? BeforeConvertedTaskId { get; set; } - [Projectable] + [NotMapped] [JsonIgnore] public bool IsConvertedTask => BeforeConvertedTaskId != null || IsHistoryConvertedTask || Subject.SubjectVisitTaskList.Where(t => t.TrialReadingCriterionId == TrialReadingCriterionId && t.DoctorUserId == DoctorUserId && t.BeforeConvertedTaskId != null diff --git a/IRaCIS.Core.Domain/Common/Dictionary.cs b/IRaCIS.Core.Domain/Common/Dictionary.cs index 34e5327b7..c0b4d6b07 100644 --- a/IRaCIS.Core.Domain/Common/Dictionary.cs +++ b/IRaCIS.Core.Domain/Common/Dictionary.cs @@ -1,4 +1,3 @@ -using EntityFrameworkCore.Projectables; using IRaCIS.Core.Domain.Share; using System; using System.Collections.Generic; @@ -57,9 +56,6 @@ namespace IRaCIS.Core.Domain.Models - [Projectable] - public string TranslateValue( string value, string valueCN,bool isCN) => isCN?valueCN:value; - } } diff --git a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj index 41daad173..9213bafcd 100644 --- a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj +++ b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj @@ -8,13 +8,6 @@ ..\bin - - - - - - - diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index 07a572a50..3c50f6ee7 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using EntityFrameworkCore.Projectables; using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models @@ -87,7 +86,8 @@ namespace IRaCIS.Core.Domain.Models /// public bool AutoCutNextTask { get; set; } = false; - [Projectable] public string FullName => LastName + " / " + FirstName; + [NotMapped] + public string FullName => LastName + " / " + FirstName; //[Projectable] public string FullName => $"{LastName} / {FirstName}"; } diff --git a/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj b/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj index 9976f5251..66854efcc 100644 --- a/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj +++ b/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj @@ -11,7 +11,11 @@ - + + + + +