Skip to content

Commit

Permalink
There's no escape from those cold north winds
Browse files Browse the repository at this point in the history
Also fixes #7016: Support "non-rooted" query expressions in compiled queries.
  • Loading branch information
ajcvickers committed Jan 14, 2022
1 parent 1ca6380 commit c9b2a87
Show file tree
Hide file tree
Showing 49 changed files with 15,086 additions and 4,170 deletions.
8 changes: 1 addition & 7 deletions src/EFCore/Query/QueryContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,9 @@ public virtual void AddParameter(string name, object? value)
/// </summary>
/// <param name="standAlone">Whether a stand-alone <see cref="IStateManager" /> should be created to perform identity resolution.</param>
public virtual void InitializeStateManager(bool standAlone = false)
{
Check.DebugAssert(
_stateManager == null,
"The 'InitializeStateManager' method has been called multiple times on the current query context. This method is intended to be called only once before query enumeration starts.");

_stateManager = standAlone
=> _stateManager ??= standAlone
? new StateManager(Dependencies.StateManager.Dependencies)
: Dependencies.StateManager;
}

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,44 @@ public NorthwindDbFunctionsQueryCosmosTest(
ClearLog();
}

public override Task Like_all_literals(bool async)
=> AssertTranslationFailed(() => base.Like_all_literals(async));
[ConditionalFact]
public virtual void Check_all_tests_overridden()
=> TestHelpers.AssertAllMethodsOverridden(GetType());

public override Task Like_all_literals_with_escape(bool async)
=> AssertTranslationFailed(() => base.Like_all_literals_with_escape(async));
public override async Task Like_all_literals(bool async)
{
await AssertTranslationFailed(() => base.Like_all_literals(async));

AssertSql();
}

public override async Task Like_all_literals_with_escape(bool async)
{
await AssertTranslationFailed(() => base.Like_all_literals_with_escape(async));

AssertSql();
}

public override async Task Like_literal(bool async)
{
await AssertTranslationFailed(() => base.Like_literal(async));

AssertSql();
}

public override async Task Like_literal_with_escape(bool async)
{
await AssertTranslationFailed(() => base.Like_literal_with_escape(async));

public override Task Like_literal(bool async)
=> AssertTranslationFailed(() => base.Like_literal(async));
AssertSql();
}

public override Task Like_literal_with_escape(bool async)
=> AssertTranslationFailed(() => base.Like_literal_with_escape(async));
public override async Task Like_identity(bool async)
{
await AssertTranslationFailed(() => base.Like_identity(async));

public override Task Like_identity(bool async)
=> AssertTranslationFailed(() => base.Like_identity(async));
AssertSql();
}

public override async Task Random_return_less_than_1(bool async)
{
Expand Down
Loading

0 comments on commit c9b2a87

Please sign in to comment.