Skip to content

Commit

Permalink
There is something rotten in the state of Denmark
Browse files Browse the repository at this point in the history
Fixing unit tests breaking on da-DK systems,
due to å = aa (last letter in Danish alphabet)
  • Loading branch information
ErikEJ authored and ajcvickers committed Jun 27, 2014
1 parent 564320d commit 357c44f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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;
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 357c44f

Please sign in to comment.