From 06cd4d152672e7d3a0c747aec838bc9e0f876eea Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Wed, 27 Nov 2024 15:46:08 -0800 Subject: [PATCH] feat(dss-969) --- .../StrDss.Data/Repositories/RentalListingRepository.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/StrDss.Data/Repositories/RentalListingRepository.cs b/server/StrDss.Data/Repositories/RentalListingRepository.cs index 5528d266..350db0c5 100644 --- a/server/StrDss.Data/Repositories/RentalListingRepository.cs +++ b/server/StrDss.Data/Repositories/RentalListingRepository.cs @@ -221,14 +221,14 @@ private static void ApplyFilters(string? all, string? address, string? url, stri if (hostName != null && hostName.IsNotEmpty()) { - var hostNameLower = hostName.ToLower(); - query = query.Where(x => x.ListingContactNamesTxt != null && x.ListingContactNamesTxt.ToLower().Contains(hostNameLower)); + var effectiveHostNm = CommonUtils.SanitizeAndUppercaseString(hostName); + query = query.Where(x => x.EffectiveHostNm != null && x.EffectiveHostNm.StartsWith(effectiveHostNm)); } if (businessLicence != null && businessLicence.IsNotEmpty()) { - var businessLicenceLower = businessLicence.ToLower(); - query = query.Where(x => x.BusinessLicenceNo != null && x.BusinessLicenceNo.ToLower().Contains(businessLicenceLower)); + var effectiveBusinessLicenceNo = CommonUtils.SanitizeAndUppercaseString(businessLicence); + query = query.Where(x => x.EffectiveBusinessLicenceNo != null && x.EffectiveBusinessLicenceNo.StartsWith(effectiveBusinessLicenceNo)); } if (prRequirement != null) @@ -245,7 +245,6 @@ private static void ApplyFilters(string? all, string? address, string? url, stri : x.IsBusinessLicenceRequired == null || x.IsBusinessLicenceRequired == false); } - if (reassigned != null && reassigned.Value == false) { reassigned = null;