From 357c44f2829b87dbc28e814303b188d680ee3ef3 Mon Sep 17 00:00:00 2001 From: ErikEJ Date: Fri, 27 Jun 2014 19:43:19 +0200 Subject: [PATCH] =?UTF-8?q?There=20is=20something=20rotten=20in=20the=20st?= =?UTF-8?q?ate=20of=20Denmark=20Fixing=20unit=20tests=20breaking=20on=20da?= =?UTF-8?q?-DK=20systems,=20due=20to=20=C3=A5=20=3D=20aa=20(last=20letter?= =?UTF-8?q?=20in=20Danish=20alphabet)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/EntityFramework.Relational/DatabaseBuilder.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EntityFramework.Relational/DatabaseBuilder.cs b/src/EntityFramework.Relational/DatabaseBuilder.cs index d02103bb996..70de998d4ef 100644 --- a/src/EntityFramework.Relational/DatabaseBuilder.cs +++ b/src/EntityFramework.Relational/DatabaseBuilder.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Linq; using JetBrains.Annotations; using Microsoft.Data.Entity.Metadata; @@ -83,7 +84,7 @@ private static string ForeignKeyName([NotNull] IForeignKey foreignKey) "FK_{0}_{1}_{2}", foreignKey.EntityType.StorageName, foreignKey.ReferencedEntityType.StorageName, - string.Join("_", foreignKey.Properties.OrderBy(p => p.Name).Select(p => p.StorageName))); + string.Join("_", foreignKey.Properties.OrderBy(p => p.Name, StringComparer.OrdinalIgnoreCase).Select(p => p.StorageName))); } private static string IndexName([NotNull] IIndex index) @@ -93,7 +94,7 @@ private static string IndexName([NotNull] IIndex index) return index.StorageName ?? string.Format( "IX_{0}_{1}", index.EntityType.StorageName, - string.Join("_", index.Properties.OrderBy(p => p.Name).Select(p => p.StorageName))); + string.Join("_", index.Properties.OrderBy(p => p.Name, StringComparer.OrdinalIgnoreCase).Select(p => p.StorageName))); } private static Table BuildTable(DatabaseModel database, IEntityType entityType)