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 }