优化导航属性
continuous-integration/drone/push Build is passing

This commit is contained in:
hang
2024-09-10 23:59:18 +08:00
parent 510a35e2b4
commit 8678c3602f
5 changed files with 3 additions and 19 deletions
@@ -67,7 +67,7 @@ namespace IRaCIS.Application.Services
.WhereIf(inQuery.UserTypeId != null, t => t.User.UserTypeId == inQuery.UserTypeId)
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.User.FullName).Contains(inQuery.UserRealName))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.User.OrganizationName.Contains(inQuery.OrganizationName))
.ProjectTo<AssginSiteCRCListDTO>(_mapper.ConfigurationProvider, new { trialSiteId = inQuery.TrialSiteId });
.ProjectTo<AssginSiteCRCListDTO>(_mapper.ConfigurationProvider);
return await query.ToPagedListAsync(inQuery);
@@ -98,7 +98,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.UserRealName, u => u.MapFrom(s => s.User.FullName))
.ForMember(d => d.TrialSiteId, u => u.MapFrom(t => trialSiteId))
.ForMember(d => d.UserType, u => u.MapFrom(t => t.User.UserTypeRole.UserTypeShortName))
.ForMember(d => d.IsSelect, u => u.MapFrom(t => t.SiteList.Any(k => k.TrialSiteId == trialSiteId)));
.ForMember(d => d.IsSelect, u => u.MapFrom(t => t.Trial.TrialSiteUserList.Any(k => k.UserId == t.UserId)));
CreateMap<User, AssginSiteCRCListDTO>();
var trialId = Guid.Empty;