Couple of tweaks.

This commit is contained in:
Thomas Hounsell 2016-01-10 17:04:32 +00:00
parent b36670c999
commit dee8385e8d
2 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,7 @@ protected override void Initialize(RequestContext requestContext)
{
try
{
CultureInfo ci = new CultureInfo(cookie.Value);
CultureInfo ci = CultureInfo.GetCultureInfo(cookie.Value);
CultureInfo.CurrentCulture = ci;
CultureInfo.CurrentUICulture = ci;
}

View File

@ -41,6 +41,14 @@ await _buildCollection.Indexes.CreateOneAsync(Builders<BuildModel>.IndexKeys.Com
Name = "_idx_group"
});
}
if (!indexes.Any(i => i["name"] == "_idx_legacy"))
{
await _buildCollection.Indexes.CreateOneAsync(Builders<BuildModel>.IndexKeys.Ascending(b => b.LegacyId), new CreateIndexOptions()
{
Name = "_idx_legacy"
});
}
}
[DataObjectMethod(DataObjectMethodType.Select, true)]