diff --git a/server/StrDss.Data/Repositories/RentalListingRepository.cs b/server/StrDss.Data/Repositories/RentalListingRepository.cs index 350db0c5..b76a49f9 100644 --- a/server/StrDss.Data/Repositories/RentalListingRepository.cs +++ b/server/StrDss.Data/Repositories/RentalListingRepository.cs @@ -198,7 +198,7 @@ private static void ApplyFilters(string? all, string? address, string? url, stri (x.PlatformListingUrl != null && x.PlatformListingUrl.ToLower().Contains(allLower)) || (x.PlatformListingNo != null && x.PlatformListingNo.ToLower().Contains(allLower)) || (x.ListingContactNamesTxt != null && x.ListingContactNamesTxt.ToLower().Contains(allLower)) || - (x.BusinessLicenceNo != null && x.BusinessLicenceNo.ToLower().Contains(allLower))); + (x.EffectiveBusinessLicenceNo != null && x.EffectiveBusinessLicenceNo.StartsWith(CommonUtils.SanitizeAndUppercaseString(all)))); } if (address != null && address.IsNotEmpty()) @@ -221,8 +221,8 @@ private static void ApplyFilters(string? all, string? address, string? url, stri if (hostName != null && hostName.IsNotEmpty()) { - var effectiveHostNm = CommonUtils.SanitizeAndUppercaseString(hostName); - query = query.Where(x => x.EffectiveHostNm != null && x.EffectiveHostNm.StartsWith(effectiveHostNm)); + var hostNameLower = hostName.ToLower(); + query = query.Where(x => x.ListingContactNamesTxt != null && x.ListingContactNamesTxt.ToLower().Contains(hostNameLower)); } if (businessLicence != null && businessLicence.IsNotEmpty())