Permalink
Browse files

There is something rotten in the state of Denmark

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 357c44f2829b87dbc28e814303b188d680ee3ef3
Showing with 3 additions and 2 deletions.
  1. +3 −2 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)

0 comments on commit 357c44f

Please sign in to comment.