#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:
Sebastien Ros
2014-09-11 17:29:25 -07:00
parent 6642d3323c
commit f2a7bc59da
5 changed files with 1 additions and 40 deletions

View File

@@ -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() {

View File

@@ -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>