CodePlex #2252: Regression from 6.0.2 - generated SQL uses CROSS APPLY instead of INNER JOIN.
We defer FilterOpRules.Rule_FilterOverOuterApply to allow the NullSemantics phase to expand EQ operations. However we do not re-run ApplyOpRules.Rule_CrossApplyOverFilter which converts the CROSS APPLY to INNER JOIN when conditions are met.
The fix adds ApplyOpRules and JoinOpRules to the deferred transformation rules.
Leaner faster hot paths - fix for workitem #2258

A performance improvement to the model building code.
1) Transformed the LINQ expressions into verbose code.
2) Using the IList<T> interface to iterate with direct accessors to the collections.
3) Inverted the order of the boolean operations in the IF statement to call SequenceEqual() only when necessary.
4) Caching a dictionary of the column mappings so reduce the amount of traversals of the entity set mappings, entity type mappings, mapping fragments, and column mappings.

This fixes a performance regression introduced in EF 6.0.2 by changeset 86d31f93dbe29c2df1c8f1cb56ec1c1e75d31941 which fixes workitem #1776.

In the repro case we have, this fix made the model building process two orders of magnitude faster than it used to be after the regression was introduced, and twice as fast as EF5.

EF5: 304 seconds.

EF6 - after regression: 23944 seconds.

EF6 - after this fix: 147 seconds.

These changes affect functionality that is covered by test FK_name_uniquification_is_not_triggered_on_different_tables.

Tests passing 100%.

(cherry picked from commit b36023187e8d60c6aa635503c9d03ea00b1ff29e)
Merge branch 'release-6.1.1-beta1'
Added QueryCache as section element in Entity Framework configuration section and read parametrized values from QueryCacheManager
Add validation into QueryCacheElement
Fixing bad test.
updated .nuspec for the CodeTemplates.VisualBasic to accurately describe itself as visual basic rather than CSharp
Added centralized timeout config for White test suite. Set timeouts to five minutes to account for the slowwwww MadDog machines.
Added UserState property to the DbCommandInterceptionContext<T> class to allow user specified state information to be associated with the interception context in implementations of the IDbCommandInterceptor interface.
Added a UserState property to more types that implement IDbMutableInterceptionContext and IDbMutableInterceptionContext<T> to make the functionality available to more IDbInterceptor implementations.
CodePlex 2274: Missing ORDER BY when followed by FirstOrDefault with condition
An execution path in FirstPredicateTranslatorBase.Translate was missing a call to RestrictResult which creates a Limit(1) expression for FirstOrDefault with predicate.
 CodePlex#2296 and CodePlex#2256 - Joins not being eliminated

 JoinElimination and PostJoinElimination transformations were run only twice. In addition the Deffered transformations were run after JoinElimination. The IQT can be simplified further in some cases by repeatedly running JoinElimination and PostJoinElimination transformations until the tree remains un-modified.

The change removes the Deferred transformation rule group and updates the PostJoinElimination rule group to include ApplyOpRules. Then it runs JoinElimination and PostJoinElimination transformations until the IQT does not change anymore, for a maximum of 10 iterations. Included two unit tests for two scenarios described in the bugs.
Add SqlFile and SqlResource functions for DbMigrations.

Handle Sql utility functions inside of SqlOperations properly.
To Serve and Protect - Fixing a few FxCop violations from the previous commit (pull request).
Changing version numbers for 6.1.1 RTM branch
Fix for CodePlex#2251
ITreeGenerator.CreateLimitNode transforms Limit(Sort(x)) to ConstrainedSort(x,Null,Limit) with the same keys as the input Sort. The transformation ensures that the sort is not eliminated by the SortRemover if it occurs in a subquery.
ITreeGenerator.CreateLimitNode also transforms Limit(x) to ConstrainedSort(x,Null,Limit), with no keys, when x is neither a Sort nor a ConstrainedSort. However, there are scenarios where x includes a Sort that will be lifted during NestPullup, in which case this becomes ConstrainedSort(Sort(x),Null,Limit) which is basically equivalent to Limit(Sort(x)) and thus it needs to be transformed to ConstrainedSort(x,Null,Limit) with the same keys as the input Sort.
Heisenberg existence... (Allow model store item collection to be used in provider DbDatabaseExists method in cases where it was previously available.)

We changed code in 6.1.1 to avoid the need to build the model before calling Exists. The reason for this is that building the model can require a connection to the database in order to get the provider manifest token. This means that, the model passed to Exists was empty because the real model has not yet been built. Note that this could happen in certain code paths before (e.g. always with Migrations and when using static methods on Database), but it now happens in most or all code paths.

The problem with this is that some providers use the model information in order to return something useable from Exists when it is not possible to know if the "database" has been created or not.

The fix included here adds a new method to DbProviderServices that takes a Lazy<StoreItemCollection>. The SQL Server provider overrides this method but never evaluates the Lazy and so the model is still not built. Providers that do not override the new method will get the base implementation which simply evaluates the Lazy and calls the original DbDatabaseExists method. This should therefore revert to the 6.1 behavior for providers other than SQL Server.
Merge branch 'release-6.1.1'
First draft of updating EFTools for VNext
Updates to pass CodeAnalysis