#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,26 +0,0 @@
Copyright (C) 2012 by Robert Moore
The source code for NHibernate.SqlAzure is available under an MIT license as
per below. If you are using the version of NHibernate.SqlAzure that is combined
with the EnterpriseLibrary dlls then it is available under the Microsoft Public
License (Ms-PL) as per http://entlib.codeplex.com/license.
-----
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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>