mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#20737: Removing ReliableSqlConnection as we moved to 4.5.1
c.f. http://tudorturcu.wordpress.com/2013/11/11/ado-net-connection-resiliency/ Work Item: 20737
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.SqlAzure;
|
||||
|
||||
namespace Orchard.Data.Providers {
|
||||
public class SqlServerDataServicesProvider : AbstractDataServicesProvider {
|
||||
@@ -26,13 +25,8 @@ namespace Orchard.Data.Providers {
|
||||
|
||||
persistence = persistence.ConnectionString(_connectionString);
|
||||
|
||||
// when using Sql Server Azure, use a specific driver, c.f. https://orchard.codeplex.com/workitem/19315
|
||||
if (IsAzureSql()) {
|
||||
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) {
|
||||
if (IsAzureSql()) {
|
||||
persistence = persistence.Dialect<NHibernate.Dialect.MsSql2012Dialect>();
|
||||
}
|
||||
|
||||
@@ -41,10 +35,6 @@ namespace Orchard.Data.Providers {
|
||||
|
||||
protected override void AlterConfiguration(Configuration config) {
|
||||
config.SetProperty(NHibernate.Cfg.Environment.PrepareSql, Boolean.TrueString);
|
||||
|
||||
if (IsAzureSql()) {
|
||||
config.SetProperty(NHibernate.Cfg.Environment.TransactionStrategy, typeof(ReliableAdoNetWithDistributedTransactionFactory).AssemblyQualifiedName);
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsAzureSql() {
|
||||
|
||||
@@ -94,9 +94,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate.linq\NHibernate.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.SqlAzure">
|
||||
<HintPath>..\..\lib\nhibernate.sqlazure\NHibernate.SqlAzure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
|
||||
Reference in New Issue
Block a user