From 9b13ed5dd3ee27dfbc3ad9b5584a8e5c369fb96b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 22 Apr 2022 11:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AA=E6=88=90=E5=8A=9Fbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialSiteService.cs | 2 +- IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs | 2 +- IRaCIS.Core.Infra.EFCore/Repository/Repository.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index e8592871..f4e06ccf 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services var siteQueryable = _siteRepository.AsQueryable(true) - .WhereIf(!string.IsNullOrWhiteSpace(trialSiteQuery.SiteName.Trim()), t => t.SiteName.Contains(trialSiteQuery.SiteName.Trim())) + .WhereIf(!string.IsNullOrWhiteSpace(trialSiteQuery.SiteName), t => t.SiteName.Contains(trialSiteQuery.SiteName)) .ProjectTo(_mapper.ConfigurationProvider, new { trialId = trialSiteQuery.TrialId }); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index d83dfb14..16a0b233 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -88,7 +88,7 @@ namespace IRaCIS.Core.Application.Service //trial site 选择列表 subjectVisit pannel 模式添加的时候 CreateMap() - .ForMember(d => d.IsSelect, u => u.MapFrom(s => s.TrialSiteList.Where(t => t.TrialId == trialId).Any(k => k.SiteId == s.Id))); + .ForMember(d => d.IsSelect, u => u.MapFrom(s => s.TrialSiteList.Any(k => k.TrialId == trialId))); #region 项目 stie pannel diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs index 65863273..0947b503 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs @@ -42,7 +42,7 @@ namespace IRaCIS.Core.Infra.EFCore - #region 异步添加 + #region 异步 EF 跟踪 添加 @@ -81,7 +81,7 @@ namespace IRaCIS.Core.Infra.EFCore await EntityVerifyAsync(true, verify); - entity = await AddAsync(entity); + entity = await AddAsync(entity,autoSave); return entity;