diff --git a/src/OrchardCore.Modules/OrchardCore.Alias/Services/AliasPartContentHandleProvider.cs b/src/OrchardCore.Modules/OrchardCore.Alias/Services/AliasPartContentHandleProvider.cs index 1f961b1440d..fc0dd6ecc64 100644 --- a/src/OrchardCore.Modules/OrchardCore.Alias/Services/AliasPartContentHandleProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Alias/Services/AliasPartContentHandleProvider.cs @@ -34,6 +34,6 @@ public async Task GetContentItemIdAsync(string handle) internal class AliasPartContentHandleHelper { internal static Task QueryAliasIndex(ISession session, string alias) => - session.Query(x => x.Alias.Equals(alias, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefaultAsync(); + session.Query(x => x.Alias == alias.ToLowerInvariant()).FirstOrDefaultAsync(); } } diff --git a/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs b/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs index de8be159574..7346fd590dd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs +++ b/src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs @@ -39,7 +39,7 @@ public override void ConfigureServices(IServiceCollection services) var session = context.Services.GetRequiredService(); var contentItem = await session.Query(x => - x.Published && x.Alias.Equals(alias, System.StringComparison.InvariantCultureIgnoreCase)) + x.Published && x.Alias == alias.ToLowerInvariant()) .FirstOrDefaultAsync(); if (contentItem == null)