diff --git a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs index 602bf2e01..6044a8f01 100644 --- a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs +++ b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs @@ -8,6 +8,8 @@ using IRaCIS.Core.Domain.Models; using Microsoft.AspNetCore.Mvc; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.ViewModel; +using IRaCIS.Core.Infra.EFCore.Common; + namespace IRaCIS.Core.Application.Service { /// @@ -39,6 +41,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetOrganInfoList(OrganInfoQuery inQuery) { var organInfoQueryable = _organInfoRepository + .WhereIf(!inQuery.TypeName.IsNullOrEmpty(),x=>x.TypeName==inQuery.TypeName) .Where(x=>x.TypeName== inQuery.TypeName) .ProjectTo(_mapper.ConfigurationProvider); return await organInfoQueryable.ToListAsync();