EntityFrameworkCore.Projectables 包问题 导致更新出错
parent
edefc8f3e7
commit
79d150829a
|
@ -27,7 +27,7 @@ namespace IRaCIS.Core.API
|
||||||
|
|
||||||
options.AddInterceptors(new QueryWithNoLockDbCommandInterceptor());
|
options.AddInterceptors(new QueryWithNoLockDbCommandInterceptor());
|
||||||
|
|
||||||
options.UseProjectables();
|
//options.UseProjectables();
|
||||||
|
|
||||||
//options.AddInterceptors(new AuditingInterceptor(configuration.GetSection("ConnectionStrings:RemoteNew").Value));
|
//options.AddInterceptors(new AuditingInterceptor(configuration.GetSection("ConnectionStrings:RemoteNew").Value));
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,9 @@ namespace IRaCIS.Application.Services
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IResponseOutput> TestDistributedLock( )
|
public async Task<IResponseOutput> TestDistributedLock( )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
_repository.Where<User>().Select(t => t.FullName).FirstOrDefault();
|
||||||
|
|
||||||
Console.WriteLine($"我进来了当前值是:" + IntValue);
|
Console.WriteLine($"我进来了当前值是:" + IntValue);
|
||||||
_logger.LogWarning($"我进来了当前值是:" + IntValue);
|
_logger.LogWarning($"我进来了当前值是:" + IntValue);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using EntityFrameworkCore.Projectables;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
@ -324,7 +323,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid? BeforeConvertedTaskId { get; set; }
|
public Guid? BeforeConvertedTaskId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[Projectable]
|
[NotMapped]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public bool IsConvertedTask => BeforeConvertedTaskId != null || IsHistoryConvertedTask || Subject.SubjectVisitTaskList.Where(t => t.TrialReadingCriterionId == TrialReadingCriterionId
|
public bool IsConvertedTask => BeforeConvertedTaskId != null || IsHistoryConvertedTask || Subject.SubjectVisitTaskList.Where(t => t.TrialReadingCriterionId == TrialReadingCriterionId
|
||||||
&& t.DoctorUserId == DoctorUserId && t.BeforeConvertedTaskId != null
|
&& t.DoctorUserId == DoctorUserId && t.BeforeConvertedTaskId != null
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using EntityFrameworkCore.Projectables;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
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;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
<OutputPath>..\bin</OutputPath>
|
<OutputPath>..\bin</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="3.0.4" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\IRaCIS.Core.Domain.Share\IRaCIS.Core.Domain.Share.csproj" />
|
<ProjectReference Include="..\IRaCIS.Core.Domain.Share\IRaCIS.Core.Domain.Share.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using EntityFrameworkCore.Projectables;
|
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
@ -87,7 +86,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoCutNextTask { get; set; } = false;
|
public bool AutoCutNextTask { get; set; } = false;
|
||||||
|
|
||||||
[Projectable] public string FullName => LastName + " / " + FirstName;
|
[NotMapped]
|
||||||
|
public string FullName => LastName + " / " + FirstName;
|
||||||
|
|
||||||
//[Projectable] public string FullName => $"{LastName} / {FirstName}";
|
//[Projectable] public string FullName => $"{LastName} / {FirstName}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
<PackageReference Include="AutoMapper" Version="12.0.1" />
|
||||||
<PackageReference Include="CSRedisCore" Version="3.8.671" />
|
<PackageReference Include="CSRedisCore" Version="3.8.671" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
|
<PackageReference Include="EFCore.BulkExtensions" Version="7.1.6" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.12" />
|
||||||
|
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="6.0.3.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.12" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.34.1" />
|
<PackageReference Include="SharpCompress" Version="0.34.1" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.5" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.5" />
|
||||||
|
|
Loading…
Reference in New Issue