Disabling a flaky test.
CurbYourEnthusiasm (Make FK fixup on loading less aggressive)

This is a fix for CodePlex 668: DetectChanges navigation property fix-up bug?

As noted following the investigation, this was not actually a bug because DetectChanges should have been called before the load was made. However, this is a bit ambiguous with lazy loading because the lazy loading call is not an explicit call into the EF APIs. So the fix here makes lazy loading less likely to behave badly if DetectChanges has not been called.

In this particular problem there are two navigation properties each with their own FK. Setting the FK for the first (let's call it the broken relationship) and then lazy loading the second (let's call it the working relationship) without first calling DetectChanges will then prevent lazy loading of the second.

All the following need to be true to hit this particular problem:
- The broken relationship must start out in the loaded state. In the repro this is the cause because its FK is null, which means EF knows that there is nothing in the database to load and so sets IsLoaded to true.
- The FK of the broken relationship must be changed before lazy loading the working relationship
- DetectChanges must not have been called after changing the FK

What happens in this situation is that when the working relationship is lazy loaded EF does FK fixup on the entities at both ends of the relationship. While looking through the FKs it caches the FK of the broken relationship. Because this cached value is updated it means that DetectChanges later does not see the change. If the broken relationship was not marked as loaded this would not matter for loading. But because DetectChanges does not see the FK change it does not flip the relationship to not loaded. Therefore it does not load.

The fix is to make FK fixup on loading only consider FKs for the relationship that has actually been loaded. This therefore prevents the cached FK from being updated, and DetectChanges is then able to fuction correctly.
Moved SqlGenerator classes under corresponding provider namespaces
CodePlex #623: Relaxed the conditions for matching edm and clr enum types by enforcing the edm type to not have more members than the clr type, instead of requiring to have the same number of members. Existing code already checks if underlying type, names and values match.
Fix up AddMember so it throws if you attempt to add an EdmMember with the
wrong DataSpace
Adding StoreFunctionName to SSDL schema writer, so that the designer can find the store functions based on the SSDL. This was preventing functions with spaces in their names (which get converted to underscores in the EDM) from being imported.
Migrations: Removes SQL keyword up-casing and parameter inlining hacks.

- Adds uppercasing keyword support to provider DML gen.
- Makes DML parameter creation optional. Used to do parameter inlining.
Migrations: Adds Alter/Move/Rename support for entity modification functions

- Updates differ to detect modification function moves/renames/alters.
- Adds corresponding operations/SQL gen/scaffolding/fluent APIs.
Migrations: Adds Alter/Move/Rename support for association set modification functions

- Updates differ to detect modification function moves/renames/alters for association set modification functions.
WorldLogSnorkellingChampion (Iteration on interception design and simple Database.Log property.)

This change updates the command interception feature in four main ways:
- More information about the commands being logged is now contained in the interception context and in particular a new DbCommandInterceptionContext that extends the general context to provide command-specific information. Additional information can be added to interception contexts in the future without making an interface breaking change.
- The "Executed" calls for async commands are now not made until after the async operation is actually completed. This allows the async and non-async methods to be collapsed since the Task-based result can now be unwrapped.
- The "Executed" calls are now made even if the command failed with an exception or the async task was canceled.
- A new TextWriter property context.Database.Log has been added based on the similar property from LINQ to SQL. We will discuss at the design meeting exactly what should be included in this log and how it should be formatted. Database.Log uses by default DbCommandLogger, but this can be changed by setting a new DbCommandLoggerFactory.
InvalidValidation: Relaxing edm validations for s-side cases.

Relaxing edm validation rules to support two valid S-Side states:
-S-Side property names with '.' (valid column names)
-Column names with same name as table. (e.g. 'EmailAddress.EmailAddress')

This change will fix the Designer's ability to import certain models
(which could be imported by previous designer release).
CF/Migrations: Fix for #1101: Scaffolding of stored procedures fails with DbUpdateException for model with self reference and store generated key

- Problem: The update pipeline throws on insert for self-referencing entities that have a store-generated key when one end of the association is required. This manifests in a confusing way when we attempt to generate modification command trees during sproc body scaffolding.

- Solutions:

1) Improve the robustness of the ModificationCommandTreeGenerator to better deal with self-refs.
2) Change the StoreGeneratedIdentityKeyConvention to not introduce identity for self-refs where one end of the association is required. This is potential breaking change in that we will now generate slightly different EDM/DDL for a given OSpace. I discussed this with several folks and we agreed that this case is likely uncommon enough that we don't need to version it. NB. The model previously generated would fail on insert at runtime.
3) Wrap any UpdateException thrown during modification command tree generation to make the exception less confusing.
Attempt fix of intermittent test failure due to async operation sometimes canceling before and sometimes canceling during Wait.
DropTheLog (Remove logging interceptor when DbContext is disposed)

If Database.Log is set for a context it causes an interceptor to be registered. When the context is disposed this interceptor should be removed, but this was not happening before.
Migrations: Fix for #1019 - Renaming self-referencing FK column throws "Sequence contains no elements" in EdmModelDiffer

- Fixed a query bug in EdmModelDiffer.FindRenamedIndependentAssociationColumns

Work Item: 1019
CodePlex #388: Added API surface for specifyin a different name for columns in each table when splitting an entity
Another attempt to fix flaky async test
Updating an async test that was missed in the last commit.
Code First: Fix for #976 - SprocMapping: Make default many-to-many modification function names more consistent with Code First

- Updated the by-convention generation for many-to-many.

Work Item: 976
Migrations: Fix for small Enable-Migrations bug.

Problem: When enabling migrations with -EnableAuto set to true for an existing initializer created database, we were not setting MigrationsConfiguration.ContextKey.
Solution: Always set the context key when the database was created via an initializer.

Work Item: 1133