diff --git a/src/EFTools/EntityDesignerVersioningFacade/ReverseEngineerDb/SchemaDiscovery/EntityStoreSchemaGeneratorDatabaseSchemaLoader.cs b/src/EFTools/EntityDesignerVersioningFacade/ReverseEngineerDb/SchemaDiscovery/EntityStoreSchemaGeneratorDatabaseSchemaLoader.cs index b4b89809ae..9029096e52 100644 --- a/src/EFTools/EntityDesignerVersioningFacade/ReverseEngineerDb/SchemaDiscovery/EntityStoreSchemaGeneratorDatabaseSchemaLoader.cs +++ b/src/EFTools/EntityDesignerVersioningFacade/ReverseEngineerDb/SchemaDiscovery/EntityStoreSchemaGeneratorDatabaseSchemaLoader.cs @@ -5,11 +5,7 @@ namespace Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.Schema using System; using System.Collections.Generic; using System.Data; - using System.Data.Common; - using System.Data.Common.CommandTrees; using System.Data.Entity.Core.EntityClient; - using System.Data.Entity.Infrastructure.Interception; - using System.Data.Entity.Utilities; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -22,8 +18,6 @@ internal class EntityStoreSchemaGeneratorDatabaseSchemaLoader private readonly EntityConnection _connection; private readonly Version _storeSchemaModelVersion; - private const string ProviderNameSqlclient = "System.Data.SqlClient"; - public EntityStoreSchemaGeneratorDatabaseSchemaLoader(EntityConnection entityConnection, Version storeSchemaModelVersion) { Debug.Assert(entityConnection != null, "entityConnection != null"); @@ -34,31 +28,15 @@ public EntityStoreSchemaGeneratorDatabaseSchemaLoader(EntityConnection entityCon _storeSchemaModelVersion = storeSchemaModelVersion; } - internal class QueryTraceOn9481Interceptor : DbCommandInterceptor - { - [SuppressMessage("Microsoft.Security", "CA2100:Review SQL queries for security vulnerabilities", - Justification = "The only SQL passed to this method consists of pre-defined queries over which the user has no control")] - public override void ReaderExecuting(DbCommand command, DbCommandInterceptionContext interceptionContext) - { - // Enables the 9481 trace flag to deal with Sql Server 2014 performance regression - // See Codeplex #2445 - command.CommandText = command.CommandText + " OPTION (QUERYTRACEON 9481)"; - base.ReaderExecuting(command, interceptionContext); - } - } - // virtual for testing public virtual StoreSchemaDetails LoadStoreSchemaDetails(IList filters) { Debug.Assert(filters != null, "filters != null"); - QueryTraceOn9481Interceptor interceptor = null; try { _connection.Open(); - interceptor = CreateAndRegisterTrace9481InterceptorIfSqlServer(); - return new StoreSchemaDetails( LoadTableDetails(filters), LoadViewDetails(filters), @@ -70,30 +48,10 @@ public virtual StoreSchemaDetails LoadStoreSchemaDetails(IList LoadTableDetails(IEnumerable filters)