mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Using SqlServer 2012 dialect when possible
Automatically used on Sql Azure, or by adding ";Dialect=MsSql2012Dialect" in the connection string
This commit is contained in:
@@ -31,6 +31,11 @@ namespace Orchard.Data.Providers {
|
||||
persistence = persistence.Driver<SqlAzureClientDriver>();
|
||||
}
|
||||
|
||||
// use MsSql2012Dialect if on Azure or if specified in the connection string
|
||||
if (IsAzureSql() || _connectionString.IndexOf(";Dialect=MsSql2012Dialect", StringComparison.OrdinalIgnoreCase) > 0) {
|
||||
persistence = persistence.Dialect<NHibernate.Dialect.MsSql2012Dialect>();
|
||||
}
|
||||
|
||||
return persistence;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user