From e6f25f08397885c62cb8d88465690ee8627bcb08 Mon Sep 17 00:00:00 2001 From: ChristopheRib63 <83826573+ChristopheRib63@users.noreply.github.com> Date: Fri, 1 Jul 2022 12:45:23 +0200 Subject: [PATCH] Research in the device list (#894) Co-authored-by: crib --- src/AzureIoTHub.Portal/Server/Services/DeviceService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AzureIoTHub.Portal/Server/Services/DeviceService.cs b/src/AzureIoTHub.Portal/Server/Services/DeviceService.cs index 661eb6e49..671330567 100644 --- a/src/AzureIoTHub.Portal/Server/Services/DeviceService.cs +++ b/src/AzureIoTHub.Portal/Server/Services/DeviceService.cs @@ -61,7 +61,7 @@ public async Task> GetAllEdgeDevice( if (!string.IsNullOrWhiteSpace(searchText)) { #pragma warning disable CA1308 // Normalize strings to uppercase - filter += $" AND (STARTSWITH(deviceId, '{searchText.ToLowerInvariant()}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))"; + filter += $" AND (STARTSWITH(deviceId, '{searchText}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))"; #pragma warning restore CA1308 // Normalize strings to uppercase } @@ -159,7 +159,7 @@ public async Task> GetAllDevice( if (!string.IsNullOrWhiteSpace(searchText)) { #pragma warning disable CA1308 // Normalize strings to uppercase - filter += $" AND (STARTSWITH(deviceId, '{searchText.ToLowerInvariant()}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))"; + filter += $" AND (STARTSWITH(deviceId, '{searchText}') OR (is_defined(tags.deviceName) AND STARTSWITH(tags.deviceName, '{searchText}')))"; #pragma warning restore CA1308 // Normalize strings to uppercase }