EntityFrameworkCore.Projectables 包问题 导致更新出错

This commit is contained in:
2023-10-13 11:18:26 +08:00
parent 4a2fd0166e
commit 9b25cea893
9 changed files with 11 additions and 19 deletions
+1 -2
View File
@@ -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
-4
View File
@@ -1,4 +1,3 @@
using EntityFrameworkCore.Projectables;
using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
@@ -60,9 +59,6 @@ namespace IRaCIS.Core.Domain.Models
[Projectable]
public string TranslateValue( string value, string valueCN,bool isCN) => isCN?valueCN:value;
}
}
+1 -2
View File
@@ -1,4 +1,3 @@
using EntityFrameworkCore.Projectables;
using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
@@ -51,7 +50,7 @@ namespace IRaCIS.Core.Domain.Models
[StringLength(100)]
public string LastName { get; set; } = string.Empty;
[Projectable]
[NotMapped]
public string FullName => LastName + " / " + FirstName;
public int Sex { get; set; }
@@ -8,10 +8,6 @@
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="3.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IRaCIS.Core.Domain.Share\IRaCIS.Core.Domain.Share.csproj" />
</ItemGroup>
+2 -2
View File
@@ -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
@@ -93,7 +92,8 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public bool AutoCutNextTask { get; set; } = false;
[Projectable] public string FullName => LastName + " / " + FirstName;
[NotMapped]
public string FullName => LastName + " / " + FirstName;
//[Projectable] public string FullName => $"{LastName} / {FirstName}";
}