diff --git a/src/EFCore.Relational/Query/SqlNullabilityProcessor.cs b/src/EFCore.Relational/Query/SqlNullabilityProcessor.cs index 538d199b843..7ce476e9b01 100644 --- a/src/EFCore.Relational/Query/SqlNullabilityProcessor.cs +++ b/src/EFCore.Relational/Query/SqlNullabilityProcessor.cs @@ -23,6 +23,9 @@ public class SqlNullabilityProcessor : ExpressionVisitor private static readonly bool UseOldBehavior37204 = AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37204", out var enabled) && enabled; + private static readonly bool UseOldBehavior37152 = + AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37152", out var enabled) && enabled; + private readonly List _nonNullableColumns; private readonly List _nullValueColumns; private readonly ISqlExpressionFactory _sqlExpressionFactory; @@ -2241,7 +2244,11 @@ private static void ExpandParameterIfNeeded( { if (expandedParameters.Count <= index) { - var parameterName = Uniquifier.Uniquify(valuesParameterName, parameters, int.MaxValue); + var parameterName = UseOldBehavior37152 + ? Uniquifier.Uniquify(valuesParameterName, parameters, int.MaxValue) +#pragma warning disable EF1001 + : Uniquifier.Uniquify(valuesParameterName, parameters, maxLength: int.MaxValue, uniquifier: index + 1); +#pragma warning restore EF1001 parameters.Add(parameterName, value); var parameterExpression = new SqlParameterExpression(parameterName, value?.GetType() ?? typeof(object), typeMapping); expandedParameters.Add(parameterExpression); diff --git a/src/EFCore/Infrastructure/Uniquifier.cs b/src/EFCore/Infrastructure/Uniquifier.cs index dcede1f8d55..db23396d5dd 100644 --- a/src/EFCore/Infrastructure/Uniquifier.cs +++ b/src/EFCore/Infrastructure/Uniquifier.cs @@ -26,7 +26,24 @@ public static string Uniquify( string currentIdentifier, IReadOnlyDictionary otherIdentifiers, int maxLength) - => Uniquify(currentIdentifier, otherIdentifiers, s => s, maxLength); + => Uniquify(currentIdentifier, otherIdentifiers, static s => s, maxLength); + + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The type of the object the identifier maps to. + /// The base identifier. + /// A dictionary where the identifier will be used as a key. + /// The maximum length of the identifier. + /// A starting number for the uniquifier. + /// A unique identifier. + [EntityFrameworkInternal] + public static string Uniquify( + string currentIdentifier, + IReadOnlyDictionary otherIdentifiers, + int maxLength, + int uniquifier) + => Uniquify(currentIdentifier, otherIdentifiers, static s => s, suffix: null, maxLength, uniquifier); /// /// Creates a unique identifier by appending a number to the given string. @@ -42,7 +59,7 @@ public static string Uniquify( IReadOnlyDictionary otherIdentifiers, string? suffix, int maxLength) - => Uniquify(currentIdentifier, otherIdentifiers, s => s, suffix, maxLength); + => Uniquify(currentIdentifier, otherIdentifiers, static s => s, suffix, maxLength); /// /// Creates a unique identifier by appending a number to the given string. @@ -61,6 +78,22 @@ public static string Uniquify( int maxLength) => Uniquify(currentIdentifier, otherIdentifiers, keySelector, suffix: null, maxLength); + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The base identifier. + /// A dictionary where the identifier will be used as part of the key. + /// The maximum length of the identifier. + /// A starting number for the uniquifier. + /// A unique identifier. + [EntityFrameworkInternal] + public static string Uniquify( + string currentIdentifier, + ISet otherIdentifiers, + int maxLength, + int uniquifier) + => Uniquify(currentIdentifier, otherIdentifiers, suffix: null, maxLength, uniquifier); + /// /// Creates a unique identifier by appending a number to the given string. /// @@ -78,9 +111,30 @@ public static string Uniquify( Func keySelector, string? suffix, int maxLength) + => Uniquify(currentIdentifier, otherIdentifiers, keySelector, suffix, maxLength, uniquifier: 1); + + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The type of the key that contains the identifier. + /// The type of the object the identifier maps to. + /// The base identifier. + /// A dictionary where the identifier will be used as part of the key. + /// An optional suffix to add after the uniquifier. + /// Creates the key object from an identifier. + /// The maximum length of the identifier. + /// A starting number for the uniquifier. + /// A unique identifier. + [EntityFrameworkInternal] + public static string Uniquify( + string currentIdentifier, + IReadOnlyDictionary otherIdentifiers, + Func keySelector, + string? suffix, + int maxLength, + int uniquifier) { var finalIdentifier = Truncate(currentIdentifier, maxLength, suffix); - var uniquifier = 1; while (otherIdentifiers.ContainsKey(keySelector(finalIdentifier))) { finalIdentifier = Truncate(currentIdentifier, maxLength, suffix, uniquifier++); @@ -102,9 +156,26 @@ public static string Uniquify( ISet otherIdentifiers, string? suffix, int maxLength) + => Uniquify(currentIdentifier, otherIdentifiers, suffix, maxLength, uniquifier: 1); + + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The base identifier. + /// A dictionary where the identifier will be used as part of the key. + /// An optional suffix to add after the uniquifier. + /// The maximum length of the identifier. + /// A starting number for the uniquifier. + /// A unique identifier. + [EntityFrameworkInternal] + public static string Uniquify( + string currentIdentifier, + ISet otherIdentifiers, + string? suffix, + int maxLength, + int uniquifier) { var finalIdentifier = Truncate(currentIdentifier, maxLength, suffix); - var uniquifier = 1; while (otherIdentifiers.Contains(finalIdentifier)) { finalIdentifier = Truncate(currentIdentifier, maxLength, suffix, uniquifier++); diff --git a/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs b/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs index 656ac41eee5..5a68b827b13 100644 --- a/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs +++ b/src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs @@ -22,6 +22,9 @@ namespace Microsoft.EntityFrameworkCore.Query.Internal; /// public class ExpressionTreeFuncletizer : ExpressionVisitor { + private static readonly bool UseOldBehavior37152 = + AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37152", out var enabled) && enabled; + // The general algorithm here is the following. // 1. First, for each node type, visit that node's children and get their states (evaluatable, contains evaluatable, no evaluatable). // 2. Calculate the parent node's aggregate state from its children; a container node whose children are all evaluatable is itself @@ -2091,11 +2094,18 @@ bool PreserveConvertNode(Expression expression) parameterName = parameterName.Substring("$VB$Local_".Length); } - // Uniquify the parameter name - var originalParameterName = parameterName; - for (var i = 0; _parameterNames.Contains(parameterName); i++) + if (UseOldBehavior37152) + { + // Uniquify the parameter name + var originalParameterName = parameterName; + for (var i = 0; _parameterNames.Contains(parameterName); i++) + { + parameterName = originalParameterName + i; + } + } + else { - parameterName = originalParameterName + i; + parameterName = Uniquifier.Uniquify(parameterName, _parameterNames, maxLength: int.MaxValue, uniquifier: _parameterNames.Count); } _parameterNames.Add(parameterName); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs index 43b68cf565e..058facbcce6 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/FromSqlQueryCosmosTest.cs @@ -789,15 +789,15 @@ await AssertQuery( """ @p='London' @p0='UK' -@p00='1' -@p1='5' +@p1='1' +@p2='5' SELECT VALUE s FROM ( SELECT * FROM root c WHERE c["City"] = @p AND c["Country"] = @p0 ) s ORDER BY s["id"] -OFFSET @p00 LIMIT @p1 +OFFSET @p1 LIMIT @p2 """); }); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs index 68f49771494..b2ff29176f3 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindMiscellaneousQueryCosmosTest.cs @@ -558,12 +558,12 @@ public override Task Skip_Take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT VALUE c FROM root c ORDER BY c["ContactName"] -OFFSET @p LIMIT @p0 +OFFSET @p LIMIT @p1 """); }); @@ -1299,13 +1299,13 @@ public override async Task Skip_Take_Any(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT VALUE EXISTS ( SELECT 1 FROM root c ORDER BY c["ContactName"] - OFFSET @p LIMIT @p0) + OFFSET @p LIMIT @p1) """); } } @@ -2292,12 +2292,12 @@ public override async Task OrderBy_skip_take(bool async) AssertSql( """ @p='5' -@p0='8' +@p1='8' SELECT VALUE c FROM root c ORDER BY c["ContactTitle"], c["ContactName"] -OFFSET @p LIMIT @p0 +OFFSET @p LIMIT @p1 """); } } @@ -3019,12 +3019,12 @@ public override Task OrderBy_Dto_projection_skip_take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT VALUE c["id"] FROM root c ORDER BY c["id"] -OFFSET @p LIMIT @p0 +OFFSET @p LIMIT @p1 """); }); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs index d65ccd5a001..4cc08e6b7c7 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/NorthwindWhereQueryCosmosTest.cs @@ -1538,11 +1538,11 @@ public override Task Two_parameters_with_same_name_get_uniquified(bool async) AssertSql( """ @customerId='ANATR' -@customerId0='ALFKI' +@customerId1='ALFKI' SELECT VALUE c FROM root c -WHERE ((c["id"] = @customerId) OR (c["id"] = @customerId0)) +WHERE ((c["id"] = @customerId) OR (c["id"] = @customerId1)) """); }); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs index ba6392d3d9c..c76ea355556 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs @@ -979,13 +979,13 @@ public override Task Client_method_skip_take_loads_owned_navigations_variation_2 AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT VALUE c FROM root c WHERE c["Terminator"] IN ("OwnedPerson", "Branch", "LeafB", "LeafA") ORDER BY c["Id"] -OFFSET @p LIMIT @p0 +OFFSET @p LIMIT @p1 """); }); @@ -998,13 +998,13 @@ public override Task Client_method_skip_take_loads_owned_navigations(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT VALUE c FROM root c WHERE c["Terminator"] IN ("OwnedPerson", "Branch", "LeafB", "LeafA") ORDER BY c["Id"] -OFFSET @p LIMIT @p0 +OFFSET @p LIMIT @p1 """); }); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/Translations/VectorSearchTranslationsCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/Translations/VectorSearchTranslationsCosmosTest.cs index 4f3dd627994..feb34832ca7 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/Translations/VectorSearchTranslationsCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/Translations/VectorSearchTranslationsCosmosTest.cs @@ -273,11 +273,11 @@ public virtual async Task RRF_with_two_Vector_distance_functions_in_OrderBy() AssertSql( """ @p='[2,1,4,6,5,2,5,7,3,1]' -@p0='[0.33,-0.52,0.45,-0.67,0.89,-0.34,0.86,-0.78]' +@p3='[0.33,-0.52,0.45,-0.67,0.89,-0.34,0.86,-0.78]' SELECT VALUE c FROM root c -ORDER BY RANK RRF(VectorDistance(c["BytesArray"], @p), VectorDistance(c["SinglesArray"], @p0)) +ORDER BY RANK RRF(VectorDistance(c["BytesArray"], @p), VectorDistance(c["SinglesArray"], @p3)) """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs index 8152a4a77d6..530e0220f14 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqlServerTest.cs @@ -264,8 +264,8 @@ public override async Task Delete_Where_Skip_Take_Skip_Take_causing_subquery(boo AssertSql( """ @p='100' -@p1='20' -@p2='5' +@p2='20' +@p3='5' DELETE FROM [o] FROM [Order Details] AS [o] @@ -281,7 +281,7 @@ ORDER BY (SELECT 1) OFFSET @p ROWS FETCH NEXT @p ROWS ONLY ) AS [o0] ORDER BY (SELECT 1) - OFFSET @p1 ROWS FETCH NEXT @p2 ROWS ONLY + OFFSET @p2 ROWS FETCH NEXT @p3 ROWS ONLY ) AS [o2] WHERE [o2].[OrderID] = [o].[OrderID] AND [o2].[ProductID] = [o].[ProductID]) """); @@ -512,7 +512,7 @@ public override async Task Delete_with_join(bool async) AssertSql( """ @p='0' -@p0='100' +@p1='100' DELETE FROM [o] FROM [Order Details] AS [o] @@ -521,7 +521,7 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [o0].[OrderID] < 10300 ORDER BY [o0].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] """); } @@ -533,7 +533,7 @@ public override async Task Delete_with_LeftJoin(bool async) AssertSql( """ @p='0' -@p0='100' +@p1='100' DELETE FROM [o] FROM [Order Details] AS [o] @@ -542,7 +542,7 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [o0].[OrderID] < 10300 ORDER BY [o0].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] WHERE [o].[OrderID] < 10276 """); @@ -555,7 +555,7 @@ public override async Task Delete_with_LeftJoin_via_flattened_GroupJoin(bool asy AssertSql( """ @p='0' -@p0='100' +@p1='100' DELETE FROM [o] FROM [Order Details] AS [o] @@ -564,7 +564,7 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [o0].[OrderID] < 10300 ORDER BY [o0].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] WHERE [o].[OrderID] < 10276 """); @@ -634,7 +634,7 @@ public override async Task Delete_with_RightJoin(bool async) AssertSql( """ @p='0' -@p0='100' +@p1='100' DELETE FROM [o] FROM [Order Details] AS [o] @@ -643,7 +643,7 @@ SELECT [o0].[OrderID] FROM [Orders] AS [o0] WHERE [o0].[OrderID] < 10300 ORDER BY [o0].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] ON [o].[OrderID] = [o1].[OrderID] WHERE [o].[OrderID] < 10276 """); @@ -799,11 +799,11 @@ public override async Task Update_Where_Skip_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) @p='4' UPDATE [c0] -SET [c0].[ContactName] = @p0 +SET [c0].[ContactName] = @p1 FROM [Customers] AS [c0] INNER JOIN ( SELECT [c].[CustomerID] @@ -822,10 +822,10 @@ public override async Task Update_Where_Take_set_constant(bool async) AssertExecuteUpdateSql( """ @p='4' -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) UPDATE TOP(@p) [c] -SET [c].[ContactName] = @p0 +SET [c].[ContactName] = @p1 FROM [Customers] AS [c] WHERE [c].[CustomerID] LIKE N'F%' """); @@ -837,19 +837,19 @@ public override async Task Update_Where_Skip_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 30) +@p2='Updated' (Size = 30) @p='2' -@p0='4' +@p1='4' UPDATE [c0] -SET [c0].[ContactName] = @p1 +SET [c0].[ContactName] = @p2 FROM [Customers] AS [c0] INNER JOIN ( SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] LIKE N'F%' ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c1] ON [c0].[CustomerID] = [c1].[CustomerID] """); } @@ -879,11 +879,11 @@ public override async Task Update_Where_OrderBy_Skip_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) @p='4' UPDATE [c0] -SET [c0].[ContactName] = @p0 +SET [c0].[ContactName] = @p1 FROM [Customers] AS [c0] INNER JOIN ( SELECT [c].[CustomerID] @@ -901,11 +901,11 @@ public override async Task Update_Where_OrderBy_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 30) +@p1='Updated' (Size = 30) @p='4' UPDATE [c0] -SET [c0].[ContactName] = @p0 +SET [c0].[ContactName] = @p1 FROM [Customers] AS [c0] INNER JOIN ( SELECT TOP(@p) [c].[CustomerID] @@ -922,19 +922,19 @@ public override async Task Update_Where_OrderBy_Skip_Take_set_constant(bool asyn AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 30) +@p2='Updated' (Size = 30) @p='2' -@p0='4' +@p1='4' UPDATE [c0] -SET [c0].[ContactName] = @p1 +SET [c0].[ContactName] = @p2 FROM [Customers] AS [c0] INNER JOIN ( SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] LIKE N'F%' ORDER BY [c].[City] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c1] ON [c0].[CustomerID] = [c1].[CustomerID] """); } @@ -945,12 +945,12 @@ public override async Task Update_Where_OrderBy_Skip_Take_Skip_Take_set_constant AssertExecuteUpdateSql( """ -@p3='Updated' (Size = 30) +@p4='Updated' (Size = 30) @p='2' -@p0='6' +@p1='6' UPDATE [c1] -SET [c1].[ContactName] = @p3 +SET [c1].[ContactName] = @p4 FROM [Customers] AS [c1] INNER JOIN ( SELECT [c0].[CustomerID] @@ -959,7 +959,7 @@ SELECT [c0].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] LIKE N'F%' ORDER BY [c].[City] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] ORDER BY [c0].[City] OFFSET @p ROWS FETCH NEXT @p ROWS ONLY @@ -1631,11 +1631,11 @@ public override async Task Update_with_PK_pushdown_and_join_and_multiple_setters AssertExecuteUpdateSql( """ @p='1' -@p1='10' (DbType = Currency) +@p2='10' (DbType = Currency) UPDATE [o2] SET [o2].[Quantity] = CAST(@p AS smallint), - [o2].[UnitPrice] = @p1 + [o2].[UnitPrice] = @p2 FROM [Order Details] AS [o2] INNER JOIN ( SELECT [o1].[OrderID], [o1].[ProductID] diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs index 9e5d4e77d50..f0f340f9185 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqlServerTest.cs @@ -189,11 +189,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4000) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE [k] SET [k].[Name] = @p, - [k].[FoundOn] = @p0 + [k].[FoundOn] = @p1 FROM [Kiwi] AS [k] WHERE [k].[CountryId] = 1 """); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs index ab3fc6e598c..8a99d6f6819 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqlServerTest.cs @@ -187,11 +187,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4000) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE [k] SET [k].[Name] = @p, - [k].[FoundOn] = @p0 + [k].[FoundOn] = @p1 FROM [Kiwi] AS [k] """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqlServerTest.cs index f1e39c5630f..7814dc5e2ac 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqlServerTest.cs @@ -118,7 +118,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async) AssertSql( """ @p='0' -@p0='3' +@p1='3' DELETE FROM [a] FROM [Animals] AS [a] @@ -127,7 +127,7 @@ SELECT [a0].[Id] FROM [Animals] AS [a0] WHERE [a0].[CountryId] = 1 AND [a0].[Name] = N'Great spotted kiwi' ORDER BY [a0].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) """); } @@ -206,11 +206,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4000) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE [a] SET [a].[Name] = @p, - [a].[FoundOn] = @p0 + [a].[FoundOn] = @p1 FROM [Animals] AS [a] WHERE [a].[Discriminator] = N'Kiwi' AND [a].[CountryId] = 1 """); diff --git a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqlServerTest.cs index b16a4916650..baf741efea3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqlServerTest.cs @@ -116,7 +116,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async) AssertSql( """ @p='0' -@p0='3' +@p1='3' DELETE FROM [a] FROM [Animals] AS [a] @@ -125,7 +125,7 @@ SELECT [a0].[Id] FROM [Animals] AS [a0] WHERE [a0].[Name] = N'Great spotted kiwi' ORDER BY [a0].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) """); } @@ -222,11 +222,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4000) -@p0='0' (Size = 1) +@p1='0' (Size = 1) UPDATE [a] SET [a].[Name] = @p, - [a].[FoundOn] = @p0 + [a].[FoundOn] = @p1 FROM [Animals] AS [a] WHERE [a].[Discriminator] = N'Kiwi' """); diff --git a/test/EFCore.SqlServer.FunctionalTests/FindSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/FindSqlServerTest.cs index 70a3e33ad96..bfb0c1f8873 100644 --- a/test/EFCore.SqlServer.FunctionalTests/FindSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/FindSqlServerTest.cs @@ -169,11 +169,11 @@ public override void Find_composite_key_from_store() AssertSql( """ @p='77' -@p0='Dog' (Size = 450) +@p1='Dog' (Size = 450) SELECT TOP(1) [c].[Id1], [c].[Id2], [c].[Foo] FROM [CompositeKey] AS [c] -WHERE [c].[Id1] = @p AND [c].[Id2] = @p0 +WHERE [c].[Id1] = @p AND [c].[Id2] = @p1 """); } @@ -184,11 +184,11 @@ public override void Returns_null_for_composite_key_not_in_store() AssertSql( """ @p='77' -@p0='Fox' (Size = 450) +@p1='Fox' (Size = 450) SELECT TOP(1) [c].[Id1], [c].[Id2], [c].[Foo] FROM [CompositeKey] AS [c] -WHERE [c].[Id1] = @p AND [c].[Id2] = @p0 +WHERE [c].[Id1] = @p AND [c].[Id2] = @p1 """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/LazyLoadProxySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/LazyLoadProxySqlServerTest.cs index 23a5c503386..c4444fb06c3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/LazyLoadProxySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/LazyLoadProxySqlServerTest.cs @@ -356,11 +356,11 @@ public override void Lazy_load_collection_composite_key(EntityState state) AssertSql( """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT [c].[Id], [c].[ParentAlternateId], [c].[ParentId], [c].[Culture_Rating], [c].[Culture_Species], [c].[Culture_Subspecies], [c].[Culture_Validation], [c].[Culture_License_Charge], [c].[Culture_License_Title], [c].[Culture_License_Tag_Text], [c].[Culture_License_Tog_Text], [c].[Culture_Manufacturer_Name], [c].[Culture_Manufacturer_Rating], [c].[Culture_Manufacturer_Tag_Text], [c].[Culture_Manufacturer_Tog_Text], [c].[Milk_Rating], [c].[Milk_Species], [c].[Milk_Subspecies], [c].[Milk_Validation], [c].[Milk_License_Charge], [c].[Milk_License_Title], [c].[Milk_License_Tag_Text], [c].[Milk_License_Tog_Text], [c].[Milk_Manufacturer_Name], [c].[Milk_Manufacturer_Rating], [c].[Milk_Manufacturer_Tag_Text], [c].[Milk_Manufacturer_Tog_Text] FROM [ChildCompositeKey] AS [c] -WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p0 +WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p1 """); } @@ -371,11 +371,11 @@ public override void Lazy_load_many_to_one_reference_to_principal_composite_key( AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId], [p].[Discriminator], [p].[Culture_Rating], [p].[Culture_Species], [p].[Culture_Subspecies], [p].[Culture_Validation], [p].[Culture_License_Charge], [p].[Culture_License_Title], [p].[Culture_License_Tag_Text], [p].[Culture_License_Tog_Text], [p].[Culture_Manufacturer_Name], [p].[Culture_Manufacturer_Rating], [p].[Culture_Manufacturer_Tag_Text], [p].[Culture_Manufacturer_Tog_Text], [p].[Milk_Rating], [p].[Milk_Species], [p].[Milk_Subspecies], [p].[Milk_Validation], [p].[Milk_License_Charge], [p].[Milk_License_Title], [p].[Milk_License_Tag_Text], [p].[Milk_License_Tog_Text], [p].[Milk_Manufacturer_Name], [p].[Milk_Manufacturer_Rating], [p].[Milk_Manufacturer_Tag_Text], [p].[Milk_Manufacturer_Tog_Text] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -386,11 +386,11 @@ public override void Lazy_load_one_to_one_reference_to_principal_composite_key(E AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId], [p].[Discriminator], [p].[Culture_Rating], [p].[Culture_Species], [p].[Culture_Subspecies], [p].[Culture_Validation], [p].[Culture_License_Charge], [p].[Culture_License_Title], [p].[Culture_License_Tag_Text], [p].[Culture_License_Tog_Text], [p].[Culture_Manufacturer_Name], [p].[Culture_Manufacturer_Rating], [p].[Culture_Manufacturer_Tag_Text], [p].[Culture_Manufacturer_Tog_Text], [p].[Milk_Rating], [p].[Milk_Species], [p].[Milk_Subspecies], [p].[Milk_Validation], [p].[Milk_License_Charge], [p].[Milk_License_Title], [p].[Milk_License_Tag_Text], [p].[Milk_License_Tog_Text], [p].[Milk_Manufacturer_Name], [p].[Milk_Manufacturer_Rating], [p].[Milk_Manufacturer_Tag_Text], [p].[Milk_Manufacturer_Tog_Text] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -401,11 +401,11 @@ public override void Lazy_load_one_to_one_reference_to_dependent_composite_key(E AssertSql( """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT TOP(1) [s].[Id], [s].[ParentAlternateId], [s].[ParentId], [s].[Culture_Rating], [s].[Culture_Species], [s].[Culture_Subspecies], [s].[Culture_Validation], [s].[Culture_License_Charge], [s].[Culture_License_Title], [s].[Culture_License_Tag_Text], [s].[Culture_License_Tog_Text], [s].[Culture_Manufacturer_Name], [s].[Culture_Manufacturer_Rating], [s].[Culture_Manufacturer_Tag_Text], [s].[Culture_Manufacturer_Tog_Text], [s].[Milk_Rating], [s].[Milk_Species], [s].[Milk_Subspecies], [s].[Milk_Validation], [s].[Milk_License_Charge], [s].[Milk_License_Title], [s].[Milk_License_Tag_Text], [s].[Milk_License_Tog_Text], [s].[Milk_Manufacturer_Name], [s].[Milk_Manufacturer_Rating], [s].[Milk_Manufacturer_Tag_Text], [s].[Milk_Manufacturer_Tog_Text] FROM [SingleCompositeKey] AS [s] -WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p0 +WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p1 """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/LoadSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/LoadSqlServerTest.cs index 8dba0fdc097..9eaf87473c2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/LoadSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/LoadSqlServerTest.cs @@ -442,11 +442,11 @@ public override void Lazy_load_collection_composite_key(EntityState state, Query ? "" : """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT [c].[Id], [c].[ParentAlternateId], [c].[ParentId] FROM [ChildCompositeKey] AS [c] -WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p0 +WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p1 """); } @@ -461,11 +461,11 @@ public override void Lazy_load_many_to_one_reference_to_principal_composite_key( ? "" : """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -480,11 +480,11 @@ public override void Lazy_load_one_to_one_reference_to_principal_composite_key( ? "" : """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -499,11 +499,11 @@ public override void Lazy_load_one_to_one_reference_to_dependent_composite_key( ? "" : """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT TOP(1) [s].[Id], [s].[ParentAlternateId], [s].[ParentId] FROM [SingleCompositeKey] AS [s] -WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p0 +WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p1 """); } @@ -1635,11 +1635,11 @@ public override async Task Load_collection_composite_key(EntityState state, bool AssertSql( """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT [c].[Id], [c].[ParentAlternateId], [c].[ParentId] FROM [ChildCompositeKey] AS [c] -WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p0 +WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p1 """); } @@ -1650,11 +1650,11 @@ public override async Task Load_many_to_one_reference_to_principal_composite_key AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -1665,11 +1665,11 @@ public override async Task Load_one_to_one_reference_to_principal_composite_key( AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(1) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -1680,11 +1680,11 @@ public override async Task Load_one_to_one_reference_to_dependent_composite_key( AssertSql( """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT TOP(1) [s].[Id], [s].[ParentAlternateId], [s].[ParentId] FROM [SingleCompositeKey] AS [s] -WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p0 +WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p1 """); } @@ -1695,11 +1695,11 @@ public override async Task Load_collection_using_Query_composite_key(EntityState AssertSql( """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT [c].[Id], [c].[ParentAlternateId], [c].[ParentId] FROM [ChildCompositeKey] AS [c] -WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p0 +WHERE [c].[ParentAlternateId] = @p AND [c].[ParentId] = @p1 """); } @@ -1710,11 +1710,11 @@ public override async Task Load_many_to_one_reference_to_principal_using_Query_c AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(2) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -1725,11 +1725,11 @@ public override async Task Load_one_to_one_reference_to_principal_using_Query_co AssertSql( """ @p='Root' (Size = 450) -@p0='707' +@p1='707' SELECT TOP(2) [p].[Id], [p].[AlternateId] FROM [Parent] AS [p] -WHERE [p].[AlternateId] = @p AND [p].[Id] = @p0 +WHERE [p].[AlternateId] = @p AND [p].[Id] = @p1 """); } @@ -1742,11 +1742,11 @@ public override async Task Load_one_to_one_reference_to_dependent_using_Query_co ? "" : """ @p='Root' (Size = 450) -@p0='707' (Nullable = true) +@p1='707' (Nullable = true) SELECT TOP(2) [s].[Id], [s].[ParentAlternateId], [s].[ParentId] FROM [SingleCompositeKey] AS [s] -WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p0 +WHERE [s].[ParentAlternateId] = @p AND [s].[ParentId] = @p1 """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonBulkUpdateSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonBulkUpdateSqlServerTest.cs index 7f15fdf2666..6ad8644b68e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonBulkUpdateSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonBulkUpdateSqlServerTest.cs @@ -578,10 +578,10 @@ public override async Task Update_multiple_properties_inside_same_associate() AssertExecuteUpdateSql( """ @p='?' (Size = 4000) -@p0='?' (DbType = Int32) +@p1='?' (DbType = Int32) UPDATE [r] -SET [r].[RequiredAssociate] = JSON_MODIFY(JSON_MODIFY([r].[RequiredAssociate], '$.String', @p), '$.Int', @p0) +SET [r].[RequiredAssociate] = JSON_MODIFY(JSON_MODIFY([r].[RequiredAssociate], '$.String', @p), '$.Int', @p1) FROM [RootEntity] AS [r] """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateSqlServerTest.cs index 997eba6ce89..e0993908426 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexTableSplitting/ComplexTableSplittingBulkUpdateSqlServerTest.cs @@ -496,11 +496,11 @@ public override async Task Update_multiple_properties_inside_same_associate() AssertExecuteUpdateSql( """ @p='?' (Size = 4000) -@p0='?' (DbType = Int32) +@p1='?' (DbType = Int32) UPDATE [r] SET [r].[RequiredAssociate_String] = @p, - [r].[RequiredAssociate_Int] = @p0 + [r].[RequiredAssociate_Int] = @p1 FROM [RootEntity] AS [r] """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs index 4a123693a67..e3d172f871e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs @@ -206,14 +206,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id], [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Required_Id] LEFT JOIN [LevelThree] AS [l2] ON [l0].[Id] = [l2].[OneToMany_Optional_Inverse3Id] @@ -229,14 +229,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l2].[Id], [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id], [l4].[Id], [l4].[Level2_Optional_Id], [l4].[Level2_Required_Id], [l4].[Name], [l4].[OneToMany_Optional_Inverse3Id], [l4].[OneToMany_Optional_Self_Inverse3Id], [l4].[OneToMany_Required_Inverse3Id], [l4].[OneToMany_Required_Self_Inverse3Id], [l4].[OneToOne_Optional_PK_Inverse3Id], [l4].[OneToOne_Optional_Self3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelTwo] AS [l2] ON [l1].[Id] = [l2].[Level1_Required_Id] @@ -253,14 +253,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id], [l3].[Id], [l3].[Level3_Optional_Id], [l3].[Level3_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse4Id], [l3].[OneToMany_Optional_Self_Inverse4Id], [l3].[OneToMany_Required_Inverse4Id], [l3].[OneToMany_Required_Self_Inverse4Id], [l3].[OneToOne_Optional_PK_Inverse4Id], [l3].[OneToOne_Optional_Self4Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelThree] AS [l2] ON [l0].[Id] = [l2].[Level2_Required_Id] @@ -2016,14 +2016,14 @@ public override async Task Filtered_include_Skip_Take_with_another_Skip_Take_on_ AssertSql( """ @p='1' -@p0='5' +@p1='5' SELECT [l3].[Id], [l3].[Date], [l3].[Name], [l3].[OneToMany_Optional_Self_Inverse1Id], [l3].[OneToMany_Required_Self_Inverse1Id], [l3].[OneToOne_Optional_Self1Id], [s].[Id], [s].[Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], [s].[Name], [s].[OneToMany_Optional_Inverse2Id], [s].[OneToMany_Optional_Self_Inverse2Id], [s].[OneToMany_Required_Inverse2Id], [s].[OneToMany_Required_Self_Inverse2Id], [s].[OneToOne_Optional_PK_Inverse2Id], [s].[OneToOne_Optional_Self2Id], [s].[Id0], [s].[Level2_Optional_Id], [s].[Level2_Required_Id], [s].[Name0], [s].[OneToMany_Optional_Inverse3Id], [s].[OneToMany_Optional_Self_Inverse3Id], [s].[OneToMany_Required_Inverse3Id], [s].[OneToMany_Required_Self_Inverse3Id], [s].[OneToOne_Optional_PK_Inverse3Id], [s].[OneToOne_Optional_Self3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Id] DESC - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l3] OUTER APPLY ( SELECT [l2].[Id], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id], [l1].[Id] AS [Id0], [l1].[Level2_Optional_Id], [l1].[Level2_Required_Id], [l1].[Name] AS [Name0], [l1].[OneToMany_Optional_Inverse3Id], [l1].[OneToMany_Optional_Self_Inverse3Id], [l1].[OneToMany_Required_Inverse3Id], [l1].[OneToMany_Required_Self_Inverse3Id], [l1].[OneToOne_Optional_PK_Inverse3Id], [l1].[OneToOne_Optional_Self3Id] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs index e16f2167ea3..7cea1548613 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs @@ -526,14 +526,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l4].[Id], [l7].[Id], [l7].[Level2_Optional_Id], [l7].[Level2_Required_Id], [l7].[Level3_Name], [l7].[OneToMany_Optional_Inverse3Id], [l7].[OneToMany_Required_Inverse3Id], [l7].[OneToOne_Optional_PK_Inverse3Id], [l4].[OneToOne_Required_PK_Date], [l4].[Level1_Optional_Id], [l4].[Level1_Required_Id], [l4].[Level2_Name], [l4].[OneToMany_Optional_Inverse2Id], [l4].[OneToMany_Required_Inverse2Id], [l4].[OneToOne_Optional_PK_Inverse2Id], [l8].[Id], [l8].[Level2_Optional_Id], [l8].[Level2_Required_Id], [l8].[Level3_Name], [l8].[OneToMany_Optional_Inverse3Id], [l8].[OneToMany_Required_Inverse3Id], [l8].[OneToOne_Optional_PK_Inverse3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name] FROM [Level1] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id] @@ -1222,14 +1222,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l4].[Id], [l4].[Level2_Optional_Id], [l4].[Level2_Required_Id], [l4].[Level3_Name], [l4].[OneToMany_Optional_Inverse3Id], [l4].[OneToMany_Required_Inverse3Id], [l4].[OneToOne_Optional_PK_Inverse3Id], [l6].[Id], [l6].[Level3_Optional_Id], [l6].[Level3_Required_Id], [l6].[Level4_Name], [l6].[OneToMany_Optional_Inverse4Id], [l6].[OneToMany_Required_Inverse4Id], [l6].[OneToOne_Optional_PK_Inverse4Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name] FROM [Level1] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id] @@ -1596,14 +1596,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l5].[Id], [l5].[Level2_Optional_Id], [l5].[Level2_Required_Id], [l5].[Level3_Name], [l5].[OneToMany_Optional_Inverse3Id], [l5].[OneToMany_Required_Inverse3Id], [l5].[OneToOne_Optional_PK_Inverse3Id], [l6].[Id], [l6].[Level2_Optional_Id], [l6].[Level2_Required_Id], [l6].[Level3_Name], [l6].[OneToMany_Optional_Inverse3Id], [l6].[OneToMany_Required_Inverse3Id], [l6].[OneToOne_Optional_PK_Inverse3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name] FROM [Level1] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id] @@ -1635,14 +1635,14 @@ public override async Task Filtered_include_Skip_Take_with_another_Skip_Take_on_ AssertSql( """ @p='1' -@p0='5' +@p1='5' SELECT [l4].[Id], [l4].[Date], [l4].[Name], [s].[Id], [s].[OneToOne_Required_PK_Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], [s].[Level2_Name], [s].[OneToMany_Optional_Inverse2Id], [s].[OneToMany_Required_Inverse2Id], [s].[OneToOne_Optional_PK_Inverse2Id], [s].[Id0], [s].[Level2_Optional_Id], [s].[Level2_Required_Id], [s].[Level3_Name], [s].[OneToMany_Optional_Inverse3Id], [s].[OneToMany_Required_Inverse3Id], [s].[OneToOne_Optional_PK_Inverse3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name] FROM [Level1] AS [l] ORDER BY [l].[Id] DESC - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l4] OUTER APPLY ( SELECT [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l3].[Id] AS [Id0], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Level3_Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs index 3289427b405..397431f911c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs @@ -1985,14 +1985,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Required_Id] ORDER BY [l1].[Name], [l1].[Id], [l0].[Id] @@ -2000,14 +2000,14 @@ OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY // """ @p='0' -@p0='10' +@p1='10' SELECT [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id], [l1].[Id], [l0].[Id] FROM ( SELECT [l].[Id], [l].[Name] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Required_Id] INNER JOIN [LevelThree] AS [l2] ON [l0].[Id] = [l2].[OneToMany_Optional_Inverse3Id] @@ -2016,14 +2016,14 @@ OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY // """ @p='0' -@p0='10' +@p1='10' SELECT [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id], [l1].[Id], [l0].[Id] FROM ( SELECT [l].[Id], [l].[Name] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Required_Id] INNER JOIN [LevelThree] AS [l3] ON [l0].[Id] = [l3].[OneToMany_Required_Inverse3Id] @@ -2038,14 +2038,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l2].[Id], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelTwo] AS [l2] ON [l1].[Id] = [l2].[Level1_Required_Id] @@ -2054,14 +2054,14 @@ OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY // """ @p='0' -@p0='10' +@p1='10' SELECT [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id], [l1].[Id], [l0].[Id], [l2].[Id] FROM ( SELECT [l].[Id], [l].[Name] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelTwo] AS [l2] ON [l1].[Id] = [l2].[Level1_Required_Id] @@ -2071,14 +2071,14 @@ OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY // """ @p='0' -@p0='10' +@p1='10' SELECT [l4].[Id], [l4].[Level2_Optional_Id], [l4].[Level2_Required_Id], [l4].[Name], [l4].[OneToMany_Optional_Inverse3Id], [l4].[OneToMany_Optional_Self_Inverse3Id], [l4].[OneToMany_Required_Inverse3Id], [l4].[OneToMany_Required_Self_Inverse3Id], [l4].[OneToOne_Optional_PK_Inverse3Id], [l4].[OneToOne_Optional_Self3Id], [l1].[Id], [l0].[Id], [l2].[Id] FROM ( SELECT [l].[Id], [l].[Name] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelTwo] AS [l2] ON [l1].[Id] = [l2].[Level1_Required_Id] @@ -2094,14 +2094,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelThree] AS [l2] ON [l0].[Id] = [l2].[Level2_Required_Id] @@ -2110,14 +2110,14 @@ OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY // """ @p='0' -@p0='10' +@p1='10' SELECT [l3].[Id], [l3].[Level3_Optional_Id], [l3].[Level3_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse4Id], [l3].[OneToMany_Optional_Self_Inverse4Id], [l3].[OneToMany_Required_Inverse4Id], [l3].[OneToMany_Required_Self_Inverse4Id], [l3].[OneToOne_Optional_PK_Inverse4Id], [l3].[OneToOne_Optional_Self4Id], [l1].[Id], [l0].[Id], [l2].[Id] FROM ( SELECT [l].[Id], [l].[Name] FROM [LevelOne] AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelThree] AS [l2] ON [l0].[Id] = [l2].[Level2_Required_Id] @@ -3313,24 +3313,24 @@ public override async Task Filtered_include_Skip_Take_with_another_Skip_Take_on_ AssertSql( """ @p='1' -@p0='5' +@p1='5' SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id] FROM [LevelOne] AS [l] ORDER BY [l].[Id] DESC -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """, // """ @p='1' -@p0='5' +@p1='5' SELECT [s].[Id], [s].[Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], [s].[Name], [s].[OneToMany_Optional_Inverse2Id], [s].[OneToMany_Optional_Self_Inverse2Id], [s].[OneToMany_Required_Inverse2Id], [s].[OneToMany_Required_Self_Inverse2Id], [s].[OneToOne_Optional_PK_Inverse2Id], [s].[OneToOne_Optional_Self2Id], [s].[Id0], [s].[Level2_Optional_Id], [s].[Level2_Required_Id], [s].[Name0], [s].[OneToMany_Optional_Inverse3Id], [s].[OneToMany_Optional_Self_Inverse3Id], [s].[OneToMany_Required_Inverse3Id], [s].[OneToMany_Required_Self_Inverse3Id], [s].[OneToOne_Optional_PK_Inverse3Id], [s].[OneToOne_Optional_Self3Id], [l3].[Id] FROM ( SELECT [l].[Id] FROM [LevelOne] AS [l] ORDER BY [l].[Id] DESC - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l3] CROSS APPLY ( SELECT [l2].[Id], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id], [l1].[Id] AS [Id0], [l1].[Level2_Optional_Id], [l1].[Level2_Required_Id], [l1].[Name] AS [Name0], [l1].[OneToMany_Optional_Inverse3Id], [l1].[OneToMany_Optional_Self_Inverse3Id], [l1].[OneToMany_Required_Inverse3Id], [l1].[OneToMany_Required_Self_Inverse3Id], [l1].[OneToOne_Optional_PK_Inverse3Id], [l1].[OneToOne_Optional_Self3Id] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServer160Test.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServer160Test.cs index fe9a0aeafb4..740aa4b91b8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServer160Test.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServer160Test.cs @@ -2633,7 +2633,7 @@ public override async Task Where_on_multilevel_reference_in_subquery_with_outer_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l].[Name] FROM [LevelThree] AS [l] @@ -2641,7 +2641,7 @@ FROM [LevelThree] AS [l] INNER JOIN [LevelOne] AS [l1] ON [l0].[Level1_Required_Id] = [l1].[Id] WHERE [l1].[Name] IN (N'L1 10', N'L1 01') ORDER BY [l].[Level2_Required_Id] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServerTest.cs index 4aca7e0eecc..155df48818a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServerTest.cs @@ -2633,7 +2633,7 @@ public override async Task Where_on_multilevel_reference_in_subquery_with_outer_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l].[Name] FROM [LevelThree] AS [l] @@ -2641,7 +2641,7 @@ FROM [LevelThree] AS [l] INNER JOIN [LevelOne] AS [l1] ON [l0].[Level1_Required_Id] = [l1].[Id] WHERE [l1].[Name] IN (N'L1 10', N'L1 01') ORDER BY [l].[Level2_Required_Id] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServer160Test.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServer160Test.cs index 107f79fece0..a630facf9a6 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServer160Test.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServer160Test.cs @@ -5306,7 +5306,7 @@ public override async Task Where_on_multilevel_reference_in_subquery_with_outer_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l3].[Level3_Name] FROM [Level1] AS [l] @@ -5336,7 +5336,7 @@ WHEN [l5].[OneToOne_Required_PK_Date] IS NOT NULL AND [l5].[Level1_Required_Id] LEFT JOIN [Level1] AS [l6] ON [l5].[Level1_Required_Id] = [l6].[Id] WHERE [l1].[OneToOne_Required_PK_Date] IS NOT NULL AND [l1].[Level1_Required_Id] IS NOT NULL AND [l1].[OneToMany_Required_Inverse2Id] IS NOT NULL AND [l3].[Level2_Required_Id] IS NOT NULL AND [l3].[OneToMany_Required_Inverse3Id] IS NOT NULL AND [l6].[Name] IN (N'L1 10', N'L1 01') ORDER BY [l3].[Level2_Required_Id] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs index c0173005f97..94f3bf220dd 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs @@ -5308,7 +5308,7 @@ public override async Task Where_on_multilevel_reference_in_subquery_with_outer_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l3].[Level3_Name] FROM [Level1] AS [l] @@ -5338,7 +5338,7 @@ WHEN [l5].[OneToOne_Required_PK_Date] IS NOT NULL AND [l5].[Level1_Required_Id] LEFT JOIN [Level1] AS [l6] ON [l5].[Level1_Required_Id] = [l6].[Id] WHERE [l1].[OneToOne_Required_PK_Date] IS NOT NULL AND [l1].[Level1_Required_Id] IS NOT NULL AND [l1].[OneToMany_Required_Inverse2Id] IS NOT NULL AND [l3].[Level2_Required_Id] IS NOT NULL AND [l3].[OneToMany_Required_Inverse3Id] IS NOT NULL AND [l6].[Name] IN (N'L1 10', N'L1 01') ORDER BY [l3].[Level2_Required_Id] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexTypeQuerySqlServerTest.cs index 78171fdfa9a..814b8316a7a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/ComplexTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/ComplexTypeQuerySqlServerTest.cs @@ -1239,7 +1239,7 @@ public override async Task Project_entity_with_complex_type_pushdown_and_then_le AssertSql( """ @p='20' -@p0='30' +@p1='30' SELECT [c3].[BillingAddress_ZipCode] AS [Zip1], [c4].[ShippingAddress_ZipCode] AS [Zip2] FROM ( @@ -1253,7 +1253,7 @@ ORDER BY [c].[Id] LEFT JOIN ( SELECT DISTINCT [c2].[Id], [c2].[Name], [c2].[BillingAddress_AddressLine1], [c2].[BillingAddress_AddressLine2], [c2].[BillingAddress_Tags], [c2].[BillingAddress_ZipCode], [c2].[BillingAddress_Country_Code], [c2].[BillingAddress_Country_FullName], [c2].[OptionalAddress_AddressLine1], [c2].[OptionalAddress_AddressLine2], [c2].[OptionalAddress_Tags], [c2].[OptionalAddress_ZipCode], [c2].[OptionalAddress_Country_Code], [c2].[OptionalAddress_Country_FullName], [c2].[ShippingAddress_AddressLine1], [c2].[ShippingAddress_AddressLine2], [c2].[ShippingAddress_Tags], [c2].[ShippingAddress_ZipCode], [c2].[ShippingAddress_Country_Code], [c2].[ShippingAddress_Country_FullName] FROM ( - SELECT TOP(@p0) [c1].[Id], [c1].[Name], [c1].[BillingAddress_AddressLine1], [c1].[BillingAddress_AddressLine2], [c1].[BillingAddress_Tags], [c1].[BillingAddress_ZipCode], [c1].[BillingAddress_Country_Code], [c1].[BillingAddress_Country_FullName], [c1].[OptionalAddress_AddressLine1], [c1].[OptionalAddress_AddressLine2], [c1].[OptionalAddress_Tags], [c1].[OptionalAddress_ZipCode], [c1].[OptionalAddress_Country_Code], [c1].[OptionalAddress_Country_FullName], [c1].[ShippingAddress_AddressLine1], [c1].[ShippingAddress_AddressLine2], [c1].[ShippingAddress_Tags], [c1].[ShippingAddress_ZipCode], [c1].[ShippingAddress_Country_Code], [c1].[ShippingAddress_Country_FullName] + SELECT TOP(@p1) [c1].[Id], [c1].[Name], [c1].[BillingAddress_AddressLine1], [c1].[BillingAddress_AddressLine2], [c1].[BillingAddress_Tags], [c1].[BillingAddress_ZipCode], [c1].[BillingAddress_Country_Code], [c1].[BillingAddress_Country_FullName], [c1].[OptionalAddress_AddressLine1], [c1].[OptionalAddress_AddressLine2], [c1].[OptionalAddress_Tags], [c1].[OptionalAddress_ZipCode], [c1].[OptionalAddress_Country_Code], [c1].[OptionalAddress_Country_FullName], [c1].[ShippingAddress_AddressLine1], [c1].[ShippingAddress_AddressLine2], [c1].[ShippingAddress_Tags], [c1].[ShippingAddress_ZipCode], [c1].[ShippingAddress_Country_Code], [c1].[ShippingAddress_Country_FullName] FROM [Customer] AS [c1] ORDER BY [c1].[Id] DESC ) AS [c2] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs index e79c08d4039..95daa83952a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs @@ -8450,7 +8450,7 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [s].[Nickname], [s].[SquadId], [s].[AssignedCityName], [s].[CityOfBirthName], [s].[Discriminator], [s].[FullName], [s].[HasSoulPatch], [s].[LeaderNickname], [s].[LeaderSquadId], [s].[Rank], [s].[HasSoulPatch0], [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId] FROM ( @@ -8463,7 +8463,7 @@ WHERE [g0].[Nickname] <> N'Dom' GROUP BY [g0].[HasSoulPatch] ) AS [g1] ON CAST(LEN([g].[Nickname]) AS int) = [g1].[c] ORDER BY [g].[Nickname] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [s] LEFT JOIN [Weapons] AS [w] ON [s].[FullName] = [w].[OwnerFullName] ORDER BY [s].[Nickname], [s].[SquadId], [s].[HasSoulPatch0] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindChangeTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindChangeTrackingQuerySqlServerTest.cs index 3556ad031ca..34211f5eab8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindChangeTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindChangeTrackingQuerySqlServerTest.cs @@ -115,7 +115,7 @@ ORDER BY [c0].[CustomerID] // """ @p='2' -@p0='1' +@p1='1' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -124,7 +124,7 @@ FROM [Customers] AS [c] ORDER BY [c].[CustomerID] ) AS [c0] ORDER BY [c0].[CustomerID] -OFFSET @p0 ROWS FETCH NEXT 1 ROWS ONLY +OFFSET @p1 ROWS FETCH NEXT 1 ROWS ONLY """, // """ @@ -195,7 +195,7 @@ ORDER BY [c0].[CustomerID] // """ @p='2' -@p0='1' +@p1='1' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -204,7 +204,7 @@ FROM [Customers] AS [c] ORDER BY [c].[CustomerID] ) AS [c0] ORDER BY [c0].[CustomerID] -OFFSET @p0 ROWS FETCH NEXT 1 ROWS ONLY +OFFSET @p1 ROWS FETCH NEXT 1 ROWS ONLY """, // """ diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs index 34ae0ce986a..fbe0bf0f43f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindEFPropertyIncludeQuerySqlServerTest.cs @@ -146,14 +146,14 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -382,12 +382,12 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -1475,12 +1475,12 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -2050,7 +2050,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -2058,7 +2058,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindGroupByQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindGroupByQuerySqlServerTest.cs index 34d120cfd8e..7775995521c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindGroupByQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindGroupByQuerySqlServerTest.cs @@ -1187,14 +1187,14 @@ public override async Task OrderBy_Skip_Take_GroupBy_Aggregate(bool async) AssertSql( """ @p='80' -@p0='500' +@p1='500' SELECT MAX([o0].[OrderID]) FROM ( SELECT [o].[OrderID], [o].[CustomerID] FROM [Orders] AS [o] ORDER BY [o].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o0] GROUP BY [o0].[CustomerID] """); @@ -1276,8 +1276,8 @@ public override async Task Join_complex_GroupBy_Aggregate(bool async) AssertSql( """ @p='100' -@p0='10' -@p1='50' +@p1='10' +@p2='50' SELECT [c0].[CustomerID] AS [Key], AVG(CAST([o0].[OrderID] AS float)) AS [Count] FROM ( @@ -1291,7 +1291,7 @@ SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] NOT IN (N'DRACD', N'FOLKO') ORDER BY [c].[City] - OFFSET @p0 ROWS FETCH NEXT @p1 ROWS ONLY + OFFSET @p1 ROWS FETCH NEXT @p2 ROWS ONLY ) AS [c0] ON [o0].[CustomerID] = [c0].[CustomerID] GROUP BY [c0].[CustomerID] """); @@ -1383,8 +1383,8 @@ public override async Task GroupJoin_complex_GroupBy_Aggregate(bool async) AssertSql( """ @p='10' -@p0='50' -@p1='100' +@p1='50' +@p2='100' SELECT [o0].[CustomerID] AS [Key], AVG(CAST([o0].[OrderID] AS float)) AS [Count] FROM ( @@ -1392,10 +1392,10 @@ SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] NOT IN (N'DRACD', N'FOLKO') ORDER BY [c].[City] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] INNER JOIN ( - SELECT TOP(@p1) [o].[OrderID], [o].[CustomerID] + SELECT TOP(@p2) [o].[OrderID], [o].[CustomerID] FROM [Orders] AS [o] WHERE [o].[OrderID] < 10400 ORDER BY [o].[OrderDate] @@ -1602,7 +1602,7 @@ public override async Task GroupBy_aggregate_Pushdown(bool async) AssertSql( """ @p='20' -@p0='4' +@p1='4' SELECT [o0].[CustomerID] FROM ( @@ -1613,7 +1613,7 @@ HAVING COUNT(*) > 10 ORDER BY [o].[CustomerID] ) AS [o0] ORDER BY [o0].[CustomerID] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -1624,7 +1624,7 @@ public override async Task GroupBy_aggregate_using_grouping_key_Pushdown(bool as AssertSql( """ @p='20' -@p0='4' +@p1='4' SELECT [o0].[Key], [o0].[Max] FROM ( @@ -1635,7 +1635,7 @@ HAVING COUNT(*) > 10 ORDER BY [o].[CustomerID] ) AS [o0] ORDER BY [o0].[Key] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -1646,7 +1646,7 @@ public override async Task GroupBy_aggregate_Pushdown_followed_by_projecting_Len AssertSql( """ @p='20' -@p0='4' +@p1='4' SELECT CAST(LEN([o0].[CustomerID]) AS int) FROM ( @@ -1657,7 +1657,7 @@ HAVING COUNT(*) > 10 ORDER BY [o].[CustomerID] ) AS [o0] ORDER BY [o0].[CustomerID] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -1668,7 +1668,7 @@ public override async Task GroupBy_aggregate_Pushdown_followed_by_projecting_con AssertSql( """ @p='20' -@p0='4' +@p1='4' SELECT 5 FROM ( @@ -1679,7 +1679,7 @@ HAVING COUNT(*) > 10 ORDER BY [o].[CustomerID] ) AS [o0] ORDER BY [o0].[CustomerID] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeNoTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeNoTrackingQuerySqlServerTest.cs index 8fff758b273..5a6159d1202 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeNoTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeNoTrackingQuerySqlServerTest.cs @@ -355,12 +355,12 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -565,14 +565,14 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -605,7 +605,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -613,7 +613,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] @@ -845,12 +845,12 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeQuerySqlServerTest.cs index b61c3060e41..580b59911c4 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindIncludeQuerySqlServerTest.cs @@ -145,14 +145,14 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -722,12 +722,12 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -808,7 +808,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -816,7 +816,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] @@ -829,12 +829,12 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs index 381263ebc48..7612cc2ca39 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindMiscellaneousQuerySqlServerTest.cs @@ -541,14 +541,14 @@ public override async Task Where_query_composition_is_not_null(bool async) AssertSql( """ @p='4' -@p0='3' +@p1='3' SELECT [e1].[EmployeeID], [e1].[City], [e1].[Country], [e1].[FirstName], [e1].[ReportsTo], [e1].[Title] FROM ( SELECT [e].[EmployeeID], [e].[City], [e].[Country], [e].[FirstName], [e].[ReportsTo], [e].[Title] FROM [Employees] AS [e] ORDER BY [e].[EmployeeID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [e1] WHERE EXISTS ( SELECT 1 @@ -1115,12 +1115,12 @@ public override async Task Skip_Take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactName] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -1131,13 +1131,13 @@ public override async Task Join_Customers_Orders_Skip_Take(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c].[ContactName], [o].[OrderID] FROM [Customers] AS [c] INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID] ORDER BY [o].[OrderID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -1148,13 +1148,13 @@ public override async Task Join_Customers_Orders_Skip_Take_followed_by_constant_ AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT N'Foo' FROM [Customers] AS [c] INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID] ORDER BY [o].[OrderID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -1165,13 +1165,13 @@ public override async Task Join_Customers_Orders_Projection_With_String_Concat_S AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT COALESCE([c].[ContactName], N'') + N' ' + COALESCE([c].[ContactTitle], N'') AS [Contact], [o].[OrderID] FROM [Customers] AS [c] INNER JOIN [Orders] AS [o] ON [c].[CustomerID] = [o].[CustomerID] ORDER BY [o].[OrderID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -1182,14 +1182,14 @@ public override async Task Join_Customers_Orders_Orders_Skip_Take_Same_Propertie AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [o].[OrderID], [c].[CustomerID] AS [CustomerIDA], [c0].[CustomerID] AS [CustomerIDB], [c].[ContactName] AS [ContactNameA], [c0].[ContactName] AS [ContactNameB] FROM [Orders] AS [o] INNER JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID] INNER JOIN [Customers] AS [c0] ON [o].[CustomerID] = [c0].[CustomerID] ORDER BY [o].[OrderID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -1222,7 +1222,7 @@ public override async Task Take_Skip(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -1231,7 +1231,7 @@ FROM [Customers] AS [c] ORDER BY [c].[ContactName] ) AS [c0] ORDER BY [c0].[ContactName] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -1242,7 +1242,7 @@ public override async Task Take_Skip_Distinct(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT DISTINCT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( @@ -1253,7 +1253,7 @@ FROM [Customers] AS [c] ORDER BY [c].[ContactName] ) AS [c0] ORDER BY [c0].[ContactName] - OFFSET @p0 ROWS + OFFSET @p1 ROWS ) AS [c1] """); } @@ -1265,7 +1265,7 @@ public override async Task Take_Skip_Distinct_Caching(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT DISTINCT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( @@ -1276,13 +1276,13 @@ FROM [Customers] AS [c] ORDER BY [c].[ContactName] ) AS [c0] ORDER BY [c0].[ContactName] - OFFSET @p0 ROWS + OFFSET @p1 ROWS ) AS [c1] """, // """ @p='15' -@p0='10' +@p1='10' SELECT DISTINCT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( @@ -1293,7 +1293,7 @@ FROM [Customers] AS [c] ORDER BY [c].[ContactName] ) AS [c0] ORDER BY [c0].[ContactName] - OFFSET @p0 ROWS + OFFSET @p1 ROWS ) AS [c1] """); } @@ -2225,7 +2225,7 @@ public override async Task Distinct_Skip_Take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -2233,7 +2233,7 @@ public override async Task Distinct_Skip_Take(bool async) FROM [Customers] AS [c] ) AS [c0] ORDER BY [c0].[ContactName] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -2262,14 +2262,14 @@ public override async Task Skip_Take_Distinct(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT DISTINCT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] """); } @@ -2281,14 +2281,14 @@ public override async Task Skip_Take_Any(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT CASE WHEN EXISTS ( SELECT 1 FROM [Customers] AS [c] ORDER BY [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY) THEN CAST(1 AS bit) + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY) THEN CAST(1 AS bit) ELSE CAST(0 AS bit) END """); @@ -2301,7 +2301,7 @@ public override async Task Skip_Take_All(bool async) AssertSql( """ @p='4' -@p0='7' +@p1='7' SELECT CASE WHEN NOT EXISTS ( @@ -2310,7 +2310,7 @@ SELECT 1 SELECT [c].[CustomerID] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] WHERE [c0].[CustomerID] NOT LIKE N'B%') THEN CAST(1 AS bit) ELSE CAST(0 AS bit) @@ -2347,7 +2347,7 @@ public override async Task Skip_Take_Any_with_predicate(bool async) AssertSql( """ @p='5' -@p0='7' +@p1='7' SELECT CASE WHEN EXISTS ( @@ -2356,7 +2356,7 @@ SELECT 1 SELECT [c].[CustomerID] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] WHERE [c0].[CustomerID] LIKE N'C%') THEN CAST(1 AS bit) ELSE CAST(0 AS bit) @@ -2978,7 +2978,7 @@ public override async Task Take_skip_null_coalesce_operator(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT DISTINCT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( @@ -2989,7 +2989,7 @@ FROM [Customers] AS [c] ORDER BY COALESCE([c].[Region], N'ZZ') ) AS [c0] ORDER BY [c0].[c] - OFFSET @p0 ROWS + OFFSET @p1 ROWS ) AS [c1] """); } @@ -3010,7 +3010,7 @@ public override async Task Select_take_skip_null_coalesce_operator(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[CompanyName], COALESCE([c0].[Region], N'ZZ') AS [Region] FROM ( @@ -3019,7 +3019,7 @@ FROM [Customers] AS [c] ORDER BY COALESCE([c].[Region], N'ZZ') ) AS [c0] ORDER BY [c0].[c] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -3030,7 +3030,7 @@ public override async Task Select_take_skip_null_coalesce_operator2(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[CompanyName], [c0].[Region] FROM ( @@ -3039,7 +3039,7 @@ FROM [Customers] AS [c] ORDER BY COALESCE([c].[Region], N'ZZ') ) AS [c0] ORDER BY [c0].[c] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -3050,7 +3050,7 @@ public override async Task Select_take_skip_null_coalesce_operator3(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -3059,7 +3059,7 @@ FROM [Customers] AS [c] ORDER BY COALESCE([c].[Region], N'ZZ') ) AS [c0] ORDER BY [c0].[c] -OFFSET @p0 ROWS +OFFSET @p1 ROWS """); } @@ -3590,12 +3590,12 @@ public override async Task OrderBy_skip_take(bool async) AssertSql( """ @p='5' -@p0='8' +@p1='8' SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -3606,8 +3606,8 @@ public override async Task OrderBy_skip_skip_take(bool async) AssertSql( """ @p='5' -@p0='8' -@p1='3' +@p1='8' +@p2='3' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( @@ -3617,7 +3617,7 @@ FROM [Customers] AS [c] OFFSET @p ROWS ) AS [c0] ORDER BY [c0].[ContactTitle], [c0].[ContactName] -OFFSET @p0 ROWS FETCH NEXT @p1 ROWS ONLY +OFFSET @p1 ROWS FETCH NEXT @p2 ROWS ONLY """); } @@ -3627,16 +3627,16 @@ public override async Task OrderBy_skip_take_take(bool async) AssertSql( """ -@p1='3' +@p2='3' @p='5' -@p0='8' +@p1='8' -SELECT TOP(@p1) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] +SELECT TOP(@p2) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] ORDER BY [c0].[ContactTitle], [c0].[ContactName] """); @@ -3649,20 +3649,20 @@ public override async Task OrderBy_skip_take_take_take_take(bool async) AssertSql( """ @p='5' -@p2='8' -@p1='10' -@p0='15' +@p3='8' +@p2='10' +@p1='15' SELECT TOP(@p) [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] FROM ( - SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] + SELECT TOP(@p3) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( - SELECT TOP(@p1) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] + SELECT TOP(@p2) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] ORDER BY [c0].[ContactTitle], [c0].[ContactName] ) AS [c1] @@ -3679,9 +3679,9 @@ public override async Task OrderBy_skip_take_skip_take_skip(bool async) AssertSql( """ @p='5' -@p0='15' -@p1='2' -@p2='8' +@p1='15' +@p2='2' +@p3='8' SELECT [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( @@ -3690,10 +3690,10 @@ public override async Task OrderBy_skip_take_skip_take_skip(bool async) SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] ORDER BY [c0].[ContactTitle], [c0].[ContactName] - OFFSET @p1 ROWS FETCH NEXT @p2 ROWS ONLY + OFFSET @p2 ROWS FETCH NEXT @p3 ROWS ONLY ) AS [c1] ORDER BY [c1].[ContactTitle], [c1].[ContactName] OFFSET @p ROWS @@ -3707,14 +3707,14 @@ public override async Task OrderBy_skip_take_distinct(bool async) AssertSql( """ @p='5' -@p0='15' +@p1='15' SELECT DISTINCT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] """); } @@ -3743,14 +3743,14 @@ public override async Task OrderBy_coalesce_skip_take_distinct(bool async) AssertSql( """ @p='5' -@p0='15' +@p1='15' SELECT DISTINCT [p0].[ProductID], [p0].[Discontinued], [p0].[ProductName], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock] FROM ( SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock] FROM [Products] AS [p] ORDER BY COALESCE([p].[UnitPrice], 0.0) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [p0] """); } @@ -3762,14 +3762,14 @@ public override async Task OrderBy_coalesce_skip_take_distinct_take(bool async) AssertSql( """ @p='5' -@p0='15' +@p1='15' SELECT DISTINCT TOP(@p) [p0].[ProductID], [p0].[Discontinued], [p0].[ProductName], [p0].[SupplierID], [p0].[UnitPrice], [p0].[UnitsInStock] FROM ( SELECT [p].[ProductID], [p].[Discontinued], [p].[ProductName], [p].[SupplierID], [p].[UnitPrice], [p].[UnitsInStock] FROM [Products] AS [p] ORDER BY COALESCE([p].[UnitPrice], 0.0) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [p0] """); } @@ -3780,18 +3780,18 @@ public override async Task OrderBy_skip_take_distinct_orderby_take(bool async) AssertSql( """ -@p1='8' +@p2='8' @p='5' -@p0='15' +@p1='15' -SELECT TOP(@p1) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] +SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region] FROM ( SELECT DISTINCT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[ContactTitle], [c].[ContactName] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] ) AS [c1] ORDER BY [c1].[ContactTitle] @@ -4164,7 +4164,7 @@ public override async Task Include_with_orderby_skip_preserves_ordering(bool asy AssertSql( """ @p='40' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM ( @@ -4172,7 +4172,7 @@ public override async Task Include_with_orderby_skip_preserves_ordering(bool asy FROM [Customers] AS [c] WHERE [c].[CustomerID] NOT IN (N'VAFFE', N'DRACD') ORDER BY [c].[City], [c].[CustomerID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[City], [c0].[CustomerID] @@ -4843,12 +4843,12 @@ public override async Task OrderBy_Dto_projection_skip_take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [c].[CustomerID] AS [Id] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -5054,13 +5054,13 @@ public override async Task OrderBy_object_type_server_evals(bool async) AssertSql( """ @p='0' -@p0='20' +@p1='20' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM [Orders] AS [o] LEFT JOIN [Customers] AS [c] ON [o].[CustomerID] = [c].[CustomerID] ORDER BY [o].[OrderID], [o].[OrderDate], [c].[CustomerID], [c].[City] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """); } @@ -5155,7 +5155,7 @@ public override async Task Projection_skip_take_collection_projection(bool async AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [o1].[OrderID], [o0].[ProductID], [o0].[OrderID] FROM ( @@ -5163,7 +5163,7 @@ SELECT [o].[OrderID] FROM [Orders] AS [o] WHERE [o].[OrderID] < 10300 ORDER BY [o].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] LEFT JOIN [Order Details] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o0].[OrderID] @@ -5218,7 +5218,7 @@ public override async Task Projection_skip_take_projection(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [c].[City] FROM ( @@ -5226,7 +5226,7 @@ SELECT [c].[City] FROM [Orders] AS [o] WHERE [o].[OrderID] < 10300 ORDER BY [o].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o0] LEFT JOIN [Customers] AS [c] ON [o0].[CustomerID] = [c].[CustomerID] ORDER BY [o0].[OrderID] @@ -5281,7 +5281,7 @@ public override async Task Collection_projection_skip_take(bool async) AssertSql( """ @p='5' -@p0='10' +@p1='10' SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate], [o0].[OrderID], [o0].[ProductID], [o0].[Discount], [o0].[Quantity], [o0].[UnitPrice] FROM ( @@ -5289,7 +5289,7 @@ public override async Task Collection_projection_skip_take(bool async) FROM [Orders] AS [o] WHERE [o].[OrderID] < 10300 ORDER BY [o].[OrderID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] LEFT JOIN [Order Details] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o0].[OrderID] @@ -5355,7 +5355,7 @@ public override async Task Anonymous_projection_skip_take_empty_collection_First AssertSql( """ @p='0' -@p0='1' +@p1='1' SELECT [o1].[OrderID], [o1].[CustomerID], [o1].[EmployeeID], [o1].[OrderDate] FROM ( @@ -5363,7 +5363,7 @@ SELECT [c].[CustomerID] FROM [Customers] AS [c] WHERE [c].[CustomerID] = N'FISSA' ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN ( SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSelectQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSelectQuerySqlServerTest.cs index 25799a1f8dd..495b6b3bd72 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSelectQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSelectQuerySqlServerTest.cs @@ -1371,10 +1371,10 @@ public override async Task Select_with_multiple_Take(bool async) AssertSql( """ -@p0='3' +@p1='3' @p='5' -SELECT TOP(@p0) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] +SELECT TOP(@p1) [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs index 278b22f66c4..e1402293072 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSetOperationsQuerySqlServerTest.cs @@ -353,7 +353,7 @@ public override async Task Select_Union_different_fields_in_anonymous_with_subqu AssertSql( """ @p='1' -@p0='10' +@p1='10' SELECT [u0].[Foo], [u0].[CustomerID], [u0].[Address], [u0].[City], [u0].[CompanyName], [u0].[ContactName], [u0].[ContactTitle], [u0].[Country], [u0].[Fax], [u0].[Phone], [u0].[PostalCode], [u0].[Region] FROM ( @@ -368,7 +368,7 @@ FROM [Customers] AS [c0] WHERE [c0].[City] = N'London' ) AS [u] ORDER BY [u].[Foo] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [u0] WHERE [u0].[Foo] = N'Berlin' ORDER BY [u0].[Foo] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs index ec279e1c389..a8a8a1193a3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeNoTrackingQuerySqlServerTest.cs @@ -28,24 +28,24 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """, // """ @p='10' -@p0='5' +@p1='5' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID] FROM ( SELECT [c].[CustomerID] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] INNER JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -352,10 +352,10 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' -SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] +SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -371,12 +371,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[CustomerID], [s].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] @@ -395,12 +395,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [s0].[CustomerID], [s0].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] @@ -583,7 +583,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -591,7 +591,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] @@ -2283,10 +2283,10 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' -SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] +SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -2302,12 +2302,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[CustomerID], [s].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs index dbea128af5a..a136a8bb361 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindSplitIncludeQuerySqlServerTest.cs @@ -183,24 +183,24 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] -OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY +OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY """, // """ @p='10' -@p0='5' +@p1='5' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [c0].[CustomerID] FROM ( SELECT [c].[CustomerID] FROM [Customers] AS [c] ORDER BY [c].[CustomerID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] INNER JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -1045,10 +1045,10 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' -SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] +SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -1064,12 +1064,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[CustomerID], [s].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] @@ -1088,12 +1088,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate], [s0].[CustomerID], [s0].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] @@ -1194,7 +1194,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -1202,7 +1202,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] @@ -1215,10 +1215,10 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' -SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] +SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID], [c2].[Address], [c2].[City], [c2].[CompanyName], [c2].[ContactName], [c2].[ContactTitle], [c2].[Country], [c2].[Fax], [c2].[Phone], [c2].[PostalCode], [c2].[Region] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -1234,12 +1234,12 @@ OFFSET 2 ROWS FETCH NEXT 2 ROWS ONLY """, // """ -@p0='1' +@p2='1' @p='2' SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[CustomerID], [s].[CustomerID0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] + SELECT TOP(@p2) [c1].[CustomerID], [c2].[CustomerID] AS [CustomerID0] FROM ( SELECT TOP(@p) [c].[CustomerID] FROM [Customers] AS [c] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs index 29d794a93b6..708cdb24de9 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindStringIncludeQuerySqlServerTest.cs @@ -146,14 +146,14 @@ public override async Task Include_collection_skip_take_no_order_by(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT [c0].[CustomerID], [c0].[Address], [c0].[City], [c0].[CompanyName], [c0].[ContactName], [c0].[ContactTitle], [c0].[Country], [c0].[Fax], [c0].[Phone], [c0].[PostalCode], [c0].[Region], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM ( SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] ORDER BY (SELECT 1) - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [c0] LEFT JOIN [Orders] AS [o] ON [c0].[CustomerID] = [o].[CustomerID] ORDER BY [c0].[CustomerID] @@ -382,12 +382,12 @@ public override async Task Include_duplicate_collection_result_operator2(bool as AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -1475,12 +1475,12 @@ public override async Task Include_duplicate_collection_result_operator(bool asy AssertSql( """ -@p0='1' +@p2='1' @p='2' SELECT [s].[CustomerID], [s].[Address], [s].[City], [s].[CompanyName], [s].[ContactName], [s].[ContactTitle], [s].[Country], [s].[Fax], [s].[Phone], [s].[PostalCode], [s].[Region], [s].[CustomerID0], [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate], [s].[Address0], [s].[City0], [s].[CompanyName0], [s].[ContactName0], [s].[ContactTitle0], [s].[Country0], [s].[Fax0], [s].[Phone0], [s].[PostalCode0], [s].[Region0], [o0].[OrderID], [o0].[CustomerID], [o0].[EmployeeID], [o0].[OrderDate] FROM ( - SELECT TOP(@p0) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] + SELECT TOP(@p2) [c1].[CustomerID], [c1].[Address], [c1].[City], [c1].[CompanyName], [c1].[ContactName], [c1].[ContactTitle], [c1].[Country], [c1].[Fax], [c1].[Phone], [c1].[PostalCode], [c1].[Region], [c2].[CustomerID] AS [CustomerID0], [c2].[Address] AS [Address0], [c2].[City] AS [City0], [c2].[CompanyName] AS [CompanyName0], [c2].[ContactName] AS [ContactName0], [c2].[ContactTitle] AS [ContactTitle0], [c2].[Country] AS [Country0], [c2].[Fax] AS [Fax0], [c2].[Phone] AS [Phone0], [c2].[PostalCode] AS [PostalCode0], [c2].[Region] AS [Region0] FROM ( SELECT TOP(@p) [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] @@ -2050,7 +2050,7 @@ public override async Task Include_where_skip_take_projection(bool async) AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o0].[CustomerID] FROM ( @@ -2058,7 +2058,7 @@ SELECT [o0].[CustomerID] FROM [Order Details] AS [o] WHERE [o].[Quantity] = CAST(10 AS smallint) ORDER BY [o].[OrderID], [o].[ProductID] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o1] INNER JOIN [Orders] AS [o0] ON [o1].[OrderID] = [o0].[OrderID] ORDER BY [o1].[OrderID], [o1].[ProductID] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs index 63a234e7e7c..49fe275a512 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NorthwindWhereQuerySqlServerTest.cs @@ -1711,11 +1711,11 @@ public override async Task Two_parameters_with_same_name_get_uniquified(bool asy AssertSql( """ @customerId='ANATR' (Size = 5) (DbType = StringFixedLength) -@customerId0='ALFKI' (Size = 5) (DbType = StringFixedLength) +@customerId1='ALFKI' (Size = 5) (DbType = StringFixedLength) SELECT [c].[CustomerID], [c].[Address], [c].[City], [c].[CompanyName], [c].[ContactName], [c].[ContactTitle], [c].[Country], [c].[Fax], [c].[Phone], [c].[PostalCode], [c].[Region] FROM [Customers] AS [c] -WHERE [c].[CustomerID] = @customerId OR [c].[CustomerID] = @customerId0 +WHERE [c].[CustomerID] = @customerId OR [c].[CustomerID] = @customerId1 """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/OwnedQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/OwnedQuerySqlServerTest.cs index e35bd90e128..758f0e05409 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/OwnedQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/OwnedQuerySqlServerTest.cs @@ -534,7 +534,7 @@ public override async Task Preserve_includes_when_applying_skip_take_after_anony AssertSql( """ @p='0' -@p0='100' +@p1='100' SELECT [o3].[Id], [o3].[Discriminator], [o3].[Name], [s].[ClientId], [s].[Id], [s].[OrderDate], [s].[OrderClientId], [s].[OrderId], [s].[Id0], [s].[Detail], [o3].[PersonAddress_AddressLine], [o3].[PersonAddress_PlaceType], [o3].[PersonAddress_ZipCode], [o3].[PersonAddress_Country_Name], [o3].[PersonAddress_Country_PlanetId], [o3].[BranchAddress_BranchName], [o3].[BranchAddress_PlaceType], [o3].[BranchAddress_Country_Name], [o3].[BranchAddress_Country_PlanetId], [o3].[LeafBAddress_LeafBType], [o3].[LeafBAddress_PlaceType], [o3].[LeafBAddress_Country_Name], [o3].[LeafBAddress_Country_PlanetId], [o3].[LeafAAddress_LeafType], [o3].[LeafAAddress_PlaceType], [o3].[LeafAAddress_Country_Name], [o3].[LeafAAddress_Country_PlanetId], [o3].[c] FROM ( @@ -543,7 +543,7 @@ SELECT COUNT(*) FROM [OwnedPerson] AS [o2]) AS [c] FROM [OwnedPerson] AS [o] ORDER BY [o].[Id] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o3] LEFT JOIN ( SELECT [o0].[ClientId], [o0].[Id], [o0].[OrderDate], [o1].[OrderClientId], [o1].[OrderId], [o1].[Id] AS [Id0], [o1].[Detail] @@ -626,14 +626,14 @@ public override async Task Client_method_skip_take_loads_owned_navigations(bool AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o2].[Id], [o2].[Discriminator], [o2].[Name], [s].[ClientId], [s].[Id], [s].[OrderDate], [s].[OrderClientId], [s].[OrderId], [s].[Id0], [s].[Detail], [o2].[PersonAddress_AddressLine], [o2].[PersonAddress_PlaceType], [o2].[PersonAddress_ZipCode], [o2].[PersonAddress_Country_Name], [o2].[PersonAddress_Country_PlanetId], [o2].[BranchAddress_BranchName], [o2].[BranchAddress_PlaceType], [o2].[BranchAddress_Country_Name], [o2].[BranchAddress_Country_PlanetId], [o2].[LeafBAddress_LeafBType], [o2].[LeafBAddress_PlaceType], [o2].[LeafBAddress_Country_Name], [o2].[LeafBAddress_Country_PlanetId], [o2].[LeafAAddress_LeafType], [o2].[LeafAAddress_PlaceType], [o2].[LeafAAddress_Country_Name], [o2].[LeafAAddress_Country_PlanetId] FROM ( SELECT [o].[Id], [o].[Discriminator], [o].[Name], [o].[PersonAddress_AddressLine], [o].[PersonAddress_PlaceType], [o].[PersonAddress_ZipCode], [o].[PersonAddress_Country_Name], [o].[PersonAddress_Country_PlanetId], [o].[BranchAddress_BranchName], [o].[BranchAddress_PlaceType], [o].[BranchAddress_Country_Name], [o].[BranchAddress_Country_PlanetId], [o].[LeafBAddress_LeafBType], [o].[LeafBAddress_PlaceType], [o].[LeafBAddress_Country_Name], [o].[LeafBAddress_Country_PlanetId], [o].[LeafAAddress_LeafType], [o].[LeafAAddress_PlaceType], [o].[LeafAAddress_Country_Name], [o].[LeafAAddress_Country_PlanetId] FROM [OwnedPerson] AS [o] ORDER BY [o].[Id] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o2] LEFT JOIN ( SELECT [o0].[ClientId], [o0].[Id], [o0].[OrderDate], [o1].[OrderClientId], [o1].[OrderId], [o1].[Id] AS [Id0], [o1].[Detail] @@ -698,14 +698,14 @@ public override async Task Client_method_skip_take_loads_owned_navigations_varia AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o2].[Id], [o2].[Discriminator], [o2].[Name], [s].[ClientId], [s].[Id], [s].[OrderDate], [s].[OrderClientId], [s].[OrderId], [s].[Id0], [s].[Detail], [o2].[PersonAddress_AddressLine], [o2].[PersonAddress_PlaceType], [o2].[PersonAddress_ZipCode], [o2].[PersonAddress_Country_Name], [o2].[PersonAddress_Country_PlanetId], [o2].[BranchAddress_BranchName], [o2].[BranchAddress_PlaceType], [o2].[BranchAddress_Country_Name], [o2].[BranchAddress_Country_PlanetId], [o2].[LeafBAddress_LeafBType], [o2].[LeafBAddress_PlaceType], [o2].[LeafBAddress_Country_Name], [o2].[LeafBAddress_Country_PlanetId], [o2].[LeafAAddress_LeafType], [o2].[LeafAAddress_PlaceType], [o2].[LeafAAddress_Country_Name], [o2].[LeafAAddress_Country_PlanetId] FROM ( SELECT [o].[Id], [o].[Discriminator], [o].[Name], [o].[PersonAddress_AddressLine], [o].[PersonAddress_PlaceType], [o].[PersonAddress_ZipCode], [o].[PersonAddress_Country_Name], [o].[PersonAddress_Country_PlanetId], [o].[BranchAddress_BranchName], [o].[BranchAddress_PlaceType], [o].[BranchAddress_Country_Name], [o].[BranchAddress_Country_PlanetId], [o].[LeafBAddress_LeafBType], [o].[LeafBAddress_PlaceType], [o].[LeafBAddress_Country_Name], [o].[LeafBAddress_Country_PlanetId], [o].[LeafAAddress_LeafType], [o].[LeafAAddress_PlaceType], [o].[LeafAAddress_Country_Name], [o].[LeafAAddress_Country_PlanetId] FROM [OwnedPerson] AS [o] ORDER BY [o].[Id] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o2] LEFT JOIN ( SELECT [o0].[ClientId], [o0].[Id], [o0].[OrderDate], [o1].[OrderClientId], [o1].[OrderId], [o1].[Id] AS [Id0], [o1].[Detail] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/QueryFilterFuncletizationSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/QueryFilterFuncletizationSqlServerTest.cs index edbf79c7720..546aa6e5b92 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/QueryFilterFuncletizationSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/QueryFilterFuncletizationSqlServerTest.cs @@ -182,29 +182,29 @@ public override void DbContext_complex_expression_is_parameterized() AssertSql( """ @ef_filter__Property='False' -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT [c].[Id], [c].[IsEnabled] FROM [ComplexFilter] AS [c] -WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p0 = CAST(1 AS bit) +WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p2 = CAST(1 AS bit) """, // """ @ef_filter__Property='True' -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT [c].[Id], [c].[IsEnabled] FROM [ComplexFilter] AS [c] -WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p0 = CAST(1 AS bit) +WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p2 = CAST(1 AS bit) """, // """ @ef_filter__Property='True' -@ef_filter__p0='False' +@ef_filter__p2='False' SELECT [c].[Id], [c].[IsEnabled] FROM [ComplexFilter] AS [c] -WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p0 = CAST(1 AS bit) +WHERE [c].[IsEnabled] = @ef_filter__Property AND @ef_filter__p2 = CAST(1 AS bit) """); } @@ -214,29 +214,29 @@ public override void DbContext_property_based_filter_does_not_short_circuit() AssertSql( """ -@ef_filter__p0='False' +@ef_filter__p2='False' @ef_filter__IsModerated='True' (Nullable = true) SELECT [s].[Id], [s].[IsDeleted], [s].[IsModerated] FROM [ShortCircuitFilter] AS [s] -WHERE [s].[IsDeleted] = CAST(0 AS bit) AND (@ef_filter__p0 = CAST(1 AS bit) OR @ef_filter__IsModerated = [s].[IsModerated]) +WHERE [s].[IsDeleted] = CAST(0 AS bit) AND (@ef_filter__p2 = CAST(1 AS bit) OR @ef_filter__IsModerated = [s].[IsModerated]) """, // """ -@ef_filter__p0='False' +@ef_filter__p2='False' @ef_filter__IsModerated='False' (Nullable = true) SELECT [s].[Id], [s].[IsDeleted], [s].[IsModerated] FROM [ShortCircuitFilter] AS [s] -WHERE [s].[IsDeleted] = CAST(0 AS bit) AND (@ef_filter__p0 = CAST(1 AS bit) OR @ef_filter__IsModerated = [s].[IsModerated]) +WHERE [s].[IsDeleted] = CAST(0 AS bit) AND (@ef_filter__p2 = CAST(1 AS bit) OR @ef_filter__IsModerated = [s].[IsModerated]) """, // """ -@ef_filter__p0='True' +@ef_filter__p2='True' SELECT [s].[Id], [s].[IsDeleted], [s].[IsModerated] FROM [ShortCircuitFilter] AS [s] -WHERE [s].[IsDeleted] = CAST(0 AS bit) AND @ef_filter__p0 = CAST(1 AS bit) +WHERE [s].[IsDeleted] = CAST(0 AS bit) AND @ef_filter__p2 = CAST(1 AS bit) """); } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs index fb6a72e683e..dacb9f9587b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs @@ -10804,7 +10804,7 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [s].[Nickname], [s].[SquadId], [s].[AssignedCityName], [s].[CityOfBirthName], [s].[FullName], [s].[HasSoulPatch], [s].[LeaderNickname], [s].[LeaderSquadId], [s].[Rank], [s].[Discriminator], [s].[HasSoulPatch0], [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId] FROM ( @@ -10829,7 +10829,7 @@ WHERE [u0].[Nickname] <> N'Dom' GROUP BY [u0].[HasSoulPatch] ) AS [u1] ON CAST(LEN([u].[Nickname]) AS int) = [u1].[c] ORDER BY [u].[Nickname] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [s] LEFT JOIN [Weapons] AS [w] ON [s].[FullName] = [w].[OwnerFullName] ORDER BY [s].[Nickname], [s].[SquadId], [s].[HasSoulPatch0] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs index 6f10a8b9225..3cbd585128e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs @@ -9131,7 +9131,7 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [s0].[Nickname], [s0].[SquadId], [s0].[AssignedCityName], [s0].[CityOfBirthName], [s0].[FullName], [s0].[HasSoulPatch], [s0].[LeaderNickname], [s0].[LeaderSquadId], [s0].[Rank], [s0].[Discriminator], [s0].[HasSoulPatch0], [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[SynergyWithId] FROM ( @@ -9147,7 +9147,7 @@ WHERE [g0].[Nickname] <> N'Dom' GROUP BY [g0].[HasSoulPatch] ) AS [s] ON CAST(LEN([g].[Nickname]) AS int) = [s].[c] ORDER BY [g].[Nickname] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [s0] LEFT JOIN [Weapons] AS [w] ON [s0].[FullName] = [w].[OwnerFullName] ORDER BY [s0].[Nickname], [s0].[SquadId], [s0].[HasSoulPatch0] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsQuerySqlServerTest.cs index ddfd414f21e..bd7663a5818 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsQuerySqlServerTest.cs @@ -534,14 +534,14 @@ public override async Task Filtered_include_Skip_Take_with_another_Skip_Take_on_ AssertSql( """ @p='1' -@p0='5' +@p1='5' SELECT [l3].[Id], [l3].[Date], [l3].[Name], [l3].[OneToMany_Optional_Self_Inverse1Id], [l3].[OneToMany_Required_Self_Inverse1Id], [l3].[OneToOne_Optional_Self1Id], [l3].[PeriodEnd], [l3].[PeriodStart], [s].[Id], [s].[Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], [s].[Name], [s].[OneToMany_Optional_Inverse2Id], [s].[OneToMany_Optional_Self_Inverse2Id], [s].[OneToMany_Required_Inverse2Id], [s].[OneToMany_Required_Self_Inverse2Id], [s].[OneToOne_Optional_PK_Inverse2Id], [s].[OneToOne_Optional_Self2Id], [s].[PeriodEnd], [s].[PeriodStart], [s].[Id0], [s].[Level2_Optional_Id], [s].[Level2_Required_Id], [s].[Name0], [s].[OneToMany_Optional_Inverse3Id], [s].[OneToMany_Optional_Self_Inverse3Id], [s].[OneToMany_Required_Inverse3Id], [s].[OneToMany_Required_Self_Inverse3Id], [s].[OneToOne_Optional_PK_Inverse3Id], [s].[OneToOne_Optional_Self3Id], [s].[PeriodEnd0], [s].[PeriodStart0] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id], [l].[PeriodEnd], [l].[PeriodStart] FROM [LevelOne] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Id] DESC - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l3] OUTER APPLY ( SELECT [l2].[Id], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l1].[Id] AS [Id0], [l1].[Level2_Optional_Id], [l1].[Level2_Required_Id], [l1].[Name] AS [Name0], [l1].[OneToMany_Optional_Inverse3Id], [l1].[OneToMany_Optional_Self_Inverse3Id], [l1].[OneToMany_Required_Inverse3Id], [l1].[OneToMany_Required_Self_Inverse3Id], [l1].[OneToOne_Optional_PK_Inverse3Id], [l1].[OneToOne_Optional_Self3Id], [l1].[PeriodEnd] AS [PeriodEnd0], [l1].[PeriodStart] AS [PeriodStart0] @@ -605,14 +605,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l1].[PeriodEnd], [l1].[PeriodStart], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l0].[PeriodEnd], [l0].[PeriodStart], [l2].[Id], [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id], [l3].[PeriodEnd], [l3].[PeriodStart], [l2].[Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Optional_Self_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToMany_Required_Self_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[OneToOne_Optional_Self2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l4].[Id], [l4].[Level2_Optional_Id], [l4].[Level2_Required_Id], [l4].[Name], [l4].[OneToMany_Optional_Inverse3Id], [l4].[OneToMany_Optional_Self_Inverse3Id], [l4].[OneToMany_Required_Inverse3Id], [l4].[OneToMany_Required_Self_Inverse3Id], [l4].[OneToOne_Optional_PK_Inverse3Id], [l4].[OneToOne_Optional_Self3Id], [l4].[PeriodEnd], [l4].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id], [l].[PeriodEnd], [l].[PeriodStart] FROM [LevelOne] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelTwo] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l2] ON [l1].[Id] = [l2].[Level1_Required_Id] @@ -1083,14 +1083,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l1].[PeriodEnd], [l1].[PeriodStart], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l0].[PeriodEnd], [l0].[PeriodStart], [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l3].[Id], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Optional_Self_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToMany_Required_Self_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[OneToOne_Optional_Self3Id], [l3].[PeriodEnd], [l3].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id], [l].[PeriodEnd], [l].[PeriodStart] FROM [LevelOne] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l0] ON [l1].[Id] = [l0].[Level1_Required_Id] LEFT JOIN [LevelThree] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l2] ON [l0].[Id] = [l2].[OneToMany_Optional_Inverse3Id] @@ -1359,14 +1359,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[OneToMany_Optional_Self_Inverse1Id], [l1].[OneToMany_Required_Self_Inverse1Id], [l1].[OneToOne_Optional_Self1Id], [l1].[PeriodEnd], [l1].[PeriodStart], [l0].[Id], [l0].[Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Optional_Self_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToMany_Required_Self_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[OneToOne_Optional_Self2Id], [l0].[PeriodEnd], [l0].[PeriodStart], [l2].[Id], [l2].[Level2_Optional_Id], [l2].[Level2_Required_Id], [l2].[Name], [l2].[OneToMany_Optional_Inverse3Id], [l2].[OneToMany_Optional_Self_Inverse3Id], [l2].[OneToMany_Required_Inverse3Id], [l2].[OneToMany_Required_Self_Inverse3Id], [l2].[OneToOne_Optional_PK_Inverse3Id], [l2].[OneToOne_Optional_Self3Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l3].[Id], [l3].[Level3_Optional_Id], [l3].[Level3_Required_Id], [l3].[Name], [l3].[OneToMany_Optional_Inverse4Id], [l3].[OneToMany_Optional_Self_Inverse4Id], [l3].[OneToMany_Required_Inverse4Id], [l3].[OneToMany_Required_Self_Inverse4Id], [l3].[OneToOne_Optional_PK_Inverse4Id], [l3].[OneToOne_Optional_Self4Id], [l3].[PeriodEnd], [l3].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[OneToMany_Optional_Self_Inverse1Id], [l].[OneToMany_Required_Self_Inverse1Id], [l].[OneToOne_Optional_Self1Id], [l].[PeriodEnd], [l].[PeriodStart] FROM [LevelOne] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN [LevelTwo] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l0] ON [l1].[Id] = [l0].[Level1_Optional_Id] LEFT JOIN [LevelThree] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l2] ON [l0].[Id] = [l2].[Level2_Required_Id] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs index 1cbbcbfc2d8..adbbd671057 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs @@ -44,14 +44,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging(bool a AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[PeriodEnd], [l1].[PeriodStart], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l5].[Id], [l5].[Level2_Optional_Id], [l5].[Level2_Required_Id], [l5].[Level3_Name], [l5].[OneToMany_Optional_Inverse3Id], [l5].[OneToMany_Required_Inverse3Id], [l5].[OneToOne_Optional_PK_Inverse3Id], [l5].[PeriodEnd], [l5].[PeriodStart], [l6].[Id], [l6].[Level2_Optional_Id], [l6].[Level2_Required_Id], [l6].[Level3_Name], [l6].[OneToMany_Optional_Inverse3Id], [l6].[OneToMany_Required_Inverse3Id], [l6].[OneToOne_Optional_PK_Inverse3Id], [l6].[PeriodEnd], [l6].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[PeriodEnd], [l].[PeriodStart] FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[PeriodEnd], [l0].[PeriodStart] @@ -83,14 +83,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[PeriodEnd], [l1].[PeriodStart], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l4].[Id], [l7].[Id], [l7].[Level2_Optional_Id], [l7].[Level2_Required_Id], [l7].[Level3_Name], [l7].[OneToMany_Optional_Inverse3Id], [l7].[OneToMany_Required_Inverse3Id], [l7].[OneToOne_Optional_PK_Inverse3Id], [l7].[PeriodEnd], [l7].[PeriodStart], [l4].[OneToOne_Required_PK_Date], [l4].[Level1_Optional_Id], [l4].[Level1_Required_Id], [l4].[Level2_Name], [l4].[OneToMany_Optional_Inverse2Id], [l4].[OneToMany_Required_Inverse2Id], [l4].[OneToOne_Optional_PK_Inverse2Id], [l4].[PeriodEnd], [l4].[PeriodStart], [l8].[Id], [l8].[Level2_Optional_Id], [l8].[Level2_Required_Id], [l8].[Level3_Name], [l8].[OneToMany_Optional_Inverse3Id], [l8].[OneToMany_Required_Inverse3Id], [l8].[OneToOne_Optional_PK_Inverse3Id], [l8].[PeriodEnd], [l8].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[PeriodEnd], [l].[PeriodStart] FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[PeriodEnd], [l0].[PeriodStart] @@ -127,14 +127,14 @@ public override async Task Complex_multi_include_with_order_by_and_paging_joins_ AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [l1].[Id], [l1].[Date], [l1].[Name], [l1].[PeriodEnd], [l1].[PeriodStart], [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l4].[Id], [l4].[Level2_Optional_Id], [l4].[Level2_Required_Id], [l4].[Level3_Name], [l4].[OneToMany_Optional_Inverse3Id], [l4].[OneToMany_Required_Inverse3Id], [l4].[OneToOne_Optional_PK_Inverse3Id], [l4].[PeriodEnd], [l4].[PeriodStart], [l6].[Id], [l6].[Level3_Optional_Id], [l6].[Level3_Required_Id], [l6].[Level4_Name], [l6].[OneToMany_Optional_Inverse4Id], [l6].[OneToMany_Required_Inverse4Id], [l6].[OneToOne_Optional_PK_Inverse4Id], [l6].[PeriodEnd], [l6].[PeriodStart] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[PeriodEnd], [l].[PeriodStart] FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Name] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l1] LEFT JOIN ( SELECT [l0].[Id], [l0].[OneToOne_Required_PK_Date], [l0].[Level1_Optional_Id], [l0].[Level1_Required_Id], [l0].[Level2_Name], [l0].[OneToMany_Optional_Inverse2Id], [l0].[OneToMany_Required_Inverse2Id], [l0].[OneToOne_Optional_PK_Inverse2Id], [l0].[PeriodEnd], [l0].[PeriodStart] @@ -1051,14 +1051,14 @@ public override async Task Filtered_include_Skip_Take_with_another_Skip_Take_on_ AssertSql( """ @p='1' -@p0='5' +@p1='5' SELECT [l4].[Id], [l4].[Date], [l4].[Name], [l4].[PeriodEnd], [l4].[PeriodStart], [s].[Id], [s].[OneToOne_Required_PK_Date], [s].[Level1_Optional_Id], [s].[Level1_Required_Id], [s].[Level2_Name], [s].[OneToMany_Optional_Inverse2Id], [s].[OneToMany_Required_Inverse2Id], [s].[OneToOne_Optional_PK_Inverse2Id], [s].[PeriodEnd], [s].[PeriodStart], [s].[Id0], [s].[Level2_Optional_Id], [s].[Level2_Required_Id], [s].[Level3_Name], [s].[OneToMany_Optional_Inverse3Id], [s].[OneToMany_Required_Inverse3Id], [s].[OneToOne_Optional_PK_Inverse3Id], [s].[PeriodEnd0], [s].[PeriodStart0] FROM ( SELECT [l].[Id], [l].[Date], [l].[Name], [l].[PeriodEnd], [l].[PeriodStart] FROM [Level1] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [l] ORDER BY [l].[Id] DESC - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [l4] OUTER APPLY ( SELECT [l2].[Id], [l2].[OneToOne_Required_PK_Date], [l2].[Level1_Optional_Id], [l2].[Level1_Required_Id], [l2].[Level2_Name], [l2].[OneToMany_Optional_Inverse2Id], [l2].[OneToMany_Required_Inverse2Id], [l2].[OneToOne_Optional_PK_Inverse2Id], [l2].[PeriodEnd], [l2].[PeriodStart], [l3].[Id] AS [Id0], [l3].[Level2_Optional_Id], [l3].[Level2_Required_Id], [l3].[Level3_Name], [l3].[OneToMany_Optional_Inverse3Id], [l3].[OneToMany_Required_Inverse3Id], [l3].[OneToOne_Optional_PK_Inverse3Id], [l3].[PeriodEnd] AS [PeriodEnd0], [l3].[PeriodStart] AS [PeriodStart0] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs index eaf5865171b..b2135e79e33 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs @@ -6689,7 +6689,7 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in AssertSql( """ @p='0' -@p0='10' +@p1='10' SELECT [s].[Nickname], [s].[SquadId], [s].[AssignedCityName], [s].[CityOfBirthName], [s].[Discriminator], [s].[FullName], [s].[HasSoulPatch], [s].[LeaderNickname], [s].[LeaderSquadId], [s].[PeriodEnd], [s].[PeriodStart], [s].[Rank], [s].[HasSoulPatch0], [w].[Id], [w].[AmmunitionType], [w].[IsAutomatic], [w].[Name], [w].[OwnerFullName], [w].[PeriodEnd], [w].[PeriodStart], [w].[SynergyWithId] FROM ( @@ -6702,7 +6702,7 @@ WHERE [g0].[Nickname] <> N'Dom' GROUP BY [g0].[HasSoulPatch] ) AS [g1] ON CAST(LEN([g].[Nickname]) AS int) = [g1].[c] ORDER BY [g].[Nickname] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [s] LEFT JOIN [Weapons] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [w] ON [s].[FullName] = [w].[OwnerFullName] ORDER BY [s].[Nickname], [s].[SquadId], [s].[HasSoulPatch0] diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs index b23fa1336df..120b0ecd277 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TemporalOwnedQuerySqlServerTest.cs @@ -602,14 +602,14 @@ public override async Task Client_method_skip_take_loads_owned_navigations(bool AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o2].[Id], [o2].[Discriminator], [o2].[Name], [o2].[PeriodEnd], [o2].[PeriodStart], [s].[ClientId], [s].[Id], [s].[OrderDate], [s].[PeriodEnd], [s].[PeriodStart], [s].[OrderClientId], [s].[OrderId], [s].[Id0], [s].[Detail], [s].[PeriodEnd0], [s].[PeriodStart0], [o2].[PersonAddress_AddressLine], [o2].[PeriodEnd0], [o2].[PeriodStart0], [o2].[PersonAddress_PlaceType], [o2].[PersonAddress_ZipCode], [o2].[PersonAddress_Country_Name], [o2].[PersonAddress_Country_PlanetId], [o2].[BranchAddress_BranchName], [o2].[BranchAddress_PlaceType], [o2].[BranchAddress_Country_Name], [o2].[BranchAddress_Country_PlanetId], [o2].[LeafBAddress_LeafBType], [o2].[LeafBAddress_PlaceType], [o2].[LeafBAddress_Country_Name], [o2].[LeafBAddress_Country_PlanetId], [o2].[LeafAAddress_LeafType], [o2].[LeafAAddress_PlaceType], [o2].[LeafAAddress_Country_Name], [o2].[LeafAAddress_Country_PlanetId] FROM ( SELECT [o].[Id], [o].[Discriminator], [o].[Name], [o].[PeriodEnd], [o].[PeriodStart], [o].[PersonAddress_AddressLine], [o].[PeriodEnd] AS [PeriodEnd0], [o].[PeriodStart] AS [PeriodStart0], [o].[PersonAddress_PlaceType], [o].[PersonAddress_ZipCode], [o].[PersonAddress_Country_Name], [o].[PersonAddress_Country_PlanetId], [o].[BranchAddress_BranchName], [o].[BranchAddress_PlaceType], [o].[BranchAddress_Country_Name], [o].[BranchAddress_Country_PlanetId], [o].[LeafBAddress_LeafBType], [o].[LeafBAddress_PlaceType], [o].[LeafBAddress_Country_Name], [o].[LeafBAddress_Country_PlanetId], [o].[LeafAAddress_LeafType], [o].[LeafAAddress_PlaceType], [o].[LeafAAddress_Country_Name], [o].[LeafAAddress_Country_PlanetId] FROM [OwnedPerson] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [o] ORDER BY [o].[Id] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o2] LEFT JOIN ( SELECT [o0].[ClientId], [o0].[Id], [o0].[OrderDate], [o0].[PeriodEnd], [o0].[PeriodStart], [o1].[OrderClientId], [o1].[OrderId], [o1].[Id] AS [Id0], [o1].[Detail], [o1].[PeriodEnd] AS [PeriodEnd0], [o1].[PeriodStart] AS [PeriodStart0] @@ -674,14 +674,14 @@ public override async Task Client_method_skip_take_loads_owned_navigations_varia AssertSql( """ @p='1' -@p0='2' +@p1='2' SELECT [o2].[Id], [o2].[Discriminator], [o2].[Name], [o2].[PeriodEnd], [o2].[PeriodStart], [s].[ClientId], [s].[Id], [s].[OrderDate], [s].[PeriodEnd], [s].[PeriodStart], [s].[OrderClientId], [s].[OrderId], [s].[Id0], [s].[Detail], [s].[PeriodEnd0], [s].[PeriodStart0], [o2].[PersonAddress_AddressLine], [o2].[PeriodEnd0], [o2].[PeriodStart0], [o2].[PersonAddress_PlaceType], [o2].[PersonAddress_ZipCode], [o2].[PersonAddress_Country_Name], [o2].[PersonAddress_Country_PlanetId], [o2].[BranchAddress_BranchName], [o2].[BranchAddress_PlaceType], [o2].[BranchAddress_Country_Name], [o2].[BranchAddress_Country_PlanetId], [o2].[LeafBAddress_LeafBType], [o2].[LeafBAddress_PlaceType], [o2].[LeafBAddress_Country_Name], [o2].[LeafBAddress_Country_PlanetId], [o2].[LeafAAddress_LeafType], [o2].[LeafAAddress_PlaceType], [o2].[LeafAAddress_Country_Name], [o2].[LeafAAddress_Country_PlanetId] FROM ( SELECT [o].[Id], [o].[Discriminator], [o].[Name], [o].[PeriodEnd], [o].[PeriodStart], [o].[PersonAddress_AddressLine], [o].[PeriodEnd] AS [PeriodEnd0], [o].[PeriodStart] AS [PeriodStart0], [o].[PersonAddress_PlaceType], [o].[PersonAddress_ZipCode], [o].[PersonAddress_Country_Name], [o].[PersonAddress_Country_PlanetId], [o].[BranchAddress_BranchName], [o].[BranchAddress_PlaceType], [o].[BranchAddress_Country_Name], [o].[BranchAddress_Country_PlanetId], [o].[LeafBAddress_LeafBType], [o].[LeafBAddress_PlaceType], [o].[LeafBAddress_Country_Name], [o].[LeafBAddress_Country_PlanetId], [o].[LeafAAddress_LeafType], [o].[LeafAAddress_PlaceType], [o].[LeafAAddress_Country_Name], [o].[LeafAAddress_Country_PlanetId] FROM [OwnedPerson] FOR SYSTEM_TIME AS OF '2010-01-01T00:00:00.0000000' AS [o] ORDER BY [o].[Id] - OFFSET @p ROWS FETCH NEXT @p0 ROWS ONLY + OFFSET @p ROWS FETCH NEXT @p1 ROWS ONLY ) AS [o2] LEFT JOIN ( SELECT [o0].[ClientId], [o0].[Id], [o0].[OrderDate], [o0].[PeriodEnd], [o0].[PeriodStart], [o1].[OrderClientId], [o1].[OrderId], [o1].[Id] AS [Id0], [o1].[Detail], [o1].[PeriodEnd] AS [PeriodEnd0], [o1].[PeriodStart] AS [PeriodStart0] diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs index 7de7a531f03..96eba3256ab 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesSqliteTest.cs @@ -266,8 +266,8 @@ public override async Task Delete_Where_Skip_Take_Skip_Take_causing_subquery(boo AssertSql( """ @p='100' -@p2='5' -@p1='20' +@p3='5' +@p2='20' DELETE FROM "Order Details" AS "o" WHERE EXISTS ( @@ -280,7 +280,7 @@ SELECT 1 WHERE "o1"."OrderID" < 10300 LIMIT @p OFFSET @p ) AS "o0" - LIMIT @p2 OFFSET @p1 + LIMIT @p3 OFFSET @p2 ) AS "o2" WHERE "o2"."OrderID" = "o"."OrderID" AND "o2"."ProductID" = "o"."ProductID") """); @@ -511,7 +511,7 @@ public override async Task Delete_with_join(bool async) AssertSql( """ -@p0='100' +@p1='100' @p='0' DELETE FROM "Order Details" AS "o" @@ -523,7 +523,7 @@ INNER JOIN ( FROM "Orders" AS "o2" WHERE "o2"."OrderID" < 10300 ORDER BY "o2"."OrderID" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "o1" ON "o0"."OrderID" = "o1"."OrderID" WHERE "o0"."OrderID" = "o"."OrderID" AND "o0"."ProductID" = "o"."ProductID") """); @@ -535,7 +535,7 @@ public override async Task Delete_with_LeftJoin(bool async) AssertSql( """ -@p0='100' +@p1='100' @p='0' DELETE FROM "Order Details" AS "o" @@ -547,7 +547,7 @@ LEFT JOIN ( FROM "Orders" AS "o2" WHERE "o2"."OrderID" < 10300 ORDER BY "o2"."OrderID" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "o1" ON "o0"."OrderID" = "o1"."OrderID" WHERE "o0"."OrderID" < 10276 AND "o0"."OrderID" = "o"."OrderID" AND "o0"."ProductID" = "o"."ProductID") """); @@ -559,7 +559,7 @@ public override async Task Delete_with_LeftJoin_via_flattened_GroupJoin(bool asy AssertSql( """ -@p0='100' +@p1='100' @p='0' DELETE FROM "Order Details" AS "o" @@ -571,7 +571,7 @@ LEFT JOIN ( FROM "Orders" AS "o2" WHERE "o2"."OrderID" < 10300 ORDER BY "o2"."OrderID" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "o1" ON "o0"."OrderID" = "o1"."OrderID" WHERE "o0"."OrderID" < 10276 AND "o0"."OrderID" = "o"."OrderID" AND "o0"."ProductID" = "o"."ProductID") """); @@ -614,7 +614,7 @@ public override async Task Delete_with_RightJoin(bool async) AssertSql( """ -@p0='100' +@p1='100' @p='0' DELETE FROM "Order Details" AS "o" @@ -626,7 +626,7 @@ RIGHT JOIN ( FROM "Orders" AS "o2" WHERE "o2"."OrderID" < 10300 ORDER BY "o2"."OrderID" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "o1" ON "o0"."OrderID" = "o1"."OrderID" WHERE "o0"."OrderID" < 10276 AND "o0"."OrderID" = "o"."OrderID" AND "o0"."ProductID" = "o"."ProductID") """); @@ -773,11 +773,11 @@ public override async Task Update_Where_Skip_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 7) +@p1='Updated' (Size = 7) @p='4' UPDATE "Customers" AS "c0" -SET "ContactName" = @p0 +SET "ContactName" = @p1 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" @@ -794,11 +794,11 @@ public override async Task Update_Where_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 7) +@p1='Updated' (Size = 7) @p='4' UPDATE "Customers" AS "c0" -SET "ContactName" = @p0 +SET "ContactName" = @p1 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" @@ -815,17 +815,17 @@ public override async Task Update_Where_Skip_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 7) -@p0='4' +@p2='Updated' (Size = 7) +@p1='4' @p='2' UPDATE "Customers" AS "c0" -SET "ContactName" = @p1 +SET "ContactName" = @p2 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" WHERE "c"."CustomerID" LIKE 'F%' - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "c1" WHERE "c0"."CustomerID" = "c1"."CustomerID" """); @@ -856,11 +856,11 @@ public override async Task Update_Where_OrderBy_Skip_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 7) +@p1='Updated' (Size = 7) @p='4' UPDATE "Customers" AS "c0" -SET "ContactName" = @p0 +SET "ContactName" = @p1 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" @@ -878,11 +878,11 @@ public override async Task Update_Where_OrderBy_Take_set_constant(bool async) AssertExecuteUpdateSql( """ -@p0='Updated' (Size = 7) +@p1='Updated' (Size = 7) @p='4' UPDATE "Customers" AS "c0" -SET "ContactName" = @p0 +SET "ContactName" = @p1 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" @@ -900,18 +900,18 @@ public override async Task Update_Where_OrderBy_Skip_Take_set_constant(bool asyn AssertExecuteUpdateSql( """ -@p1='Updated' (Size = 7) -@p0='4' +@p2='Updated' (Size = 7) +@p1='4' @p='2' UPDATE "Customers" AS "c0" -SET "ContactName" = @p1 +SET "ContactName" = @p2 FROM ( SELECT "c"."CustomerID" FROM "Customers" AS "c" WHERE "c"."CustomerID" LIKE 'F%' ORDER BY "c"."City" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "c1" WHERE "c0"."CustomerID" = "c1"."CustomerID" """); @@ -923,12 +923,12 @@ public override async Task Update_Where_OrderBy_Skip_Take_Skip_Take_set_constant AssertExecuteUpdateSql( """ -@p3='Updated' (Size = 7) -@p0='6' +@p4='Updated' (Size = 7) +@p1='6' @p='2' UPDATE "Customers" AS "c1" -SET "ContactName" = @p3 +SET "ContactName" = @p4 FROM ( SELECT "c0"."CustomerID" FROM ( @@ -936,7 +936,7 @@ public override async Task Update_Where_OrderBy_Skip_Take_Skip_Take_set_constant FROM "Customers" AS "c" WHERE "c"."CustomerID" LIKE 'F%' ORDER BY "c"."City" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "c0" ORDER BY "c0"."City" LIMIT @p OFFSET @p @@ -1538,11 +1538,11 @@ public override async Task Update_with_PK_pushdown_and_join_and_multiple_setters AssertExecuteUpdateSql( """ @p='1' -@p1='10' +@p2='10' UPDATE "Order Details" AS "o2" SET "Quantity" = CAST(@p AS INTEGER), - "UnitPrice" = @p1 + "UnitPrice" = @p2 FROM ( SELECT "o1"."OrderID", "o1"."ProductID" FROM ( diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs index 7938dd28ba3..12c7757746e 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCFiltersInheritanceBulkUpdatesSqliteTest.cs @@ -183,11 +183,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4) -@p0='0' +@p1='0' UPDATE "Kiwi" AS "k" SET "Name" = @p, - "FoundOn" = @p0 + "FoundOn" = @p1 WHERE "k"."CountryId" = 1 """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs index 0454720c30f..a022b371a1a 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPCInheritanceBulkUpdatesSqliteTest.cs @@ -181,11 +181,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4) -@p0='0' +@p1='0' UPDATE "Kiwi" AS "k" SET "Name" = @p, - "FoundOn" = @p0 + "FoundOn" = @p1 """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqliteTest.cs index 285f42fb601..ec13ce4a841 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHFiltersInheritanceBulkUpdatesSqliteTest.cs @@ -32,7 +32,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async) AssertSql( """ -@p0='3' +@p1='3' @p='0' DELETE FROM "Animals" AS "a" @@ -41,7 +41,7 @@ DELETE FROM "Animals" AS "a" FROM "Animals" AS "a0" WHERE "a0"."CountryId" = 1 AND "a0"."Name" = 'Great spotted kiwi' ORDER BY "a0"."Name" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) """); } @@ -214,11 +214,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4) -@p0='0' +@p1='0' UPDATE "Animals" AS "a" SET "Name" = @p, - "FoundOn" = @p0 + "FoundOn" = @p1 WHERE "a"."Discriminator" = 'Kiwi' AND "a"."CountryId" = 1 """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqliteTest.cs index 677164c7fee..c905ad16a86 100644 --- a/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/BulkUpdates/TPHInheritanceBulkUpdatesSqliteTest.cs @@ -31,7 +31,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async) AssertSql( """ -@p0='3' +@p1='3' @p='0' DELETE FROM "Animals" AS "a" @@ -40,7 +40,7 @@ DELETE FROM "Animals" AS "a" FROM "Animals" AS "a0" WHERE "a0"."Name" = 'Great spotted kiwi' ORDER BY "a0"."Name" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) """); } @@ -212,11 +212,11 @@ public override async Task Update_base_and_derived_types(bool async) AssertExecuteUpdateSql( """ @p='Kiwi' (Size = 4) -@p0='0' +@p1='0' UPDATE "Animals" AS "a" SET "Name" = @p, - "FoundOn" = @p0 + "FoundOn" = @p1 WHERE "a"."Discriminator" = 'Kiwi' """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/ComplexTypeQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/ComplexTypeQuerySqliteTest.cs index 8ad6eaaa50c..1c6ffb0e6ce 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/ComplexTypeQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/ComplexTypeQuerySqliteTest.cs @@ -1131,7 +1131,7 @@ public override async Task Project_entity_with_complex_type_pushdown_and_then_le AssertSql( """ @p='20' -@p0='30' +@p1='30' SELECT "c3"."BillingAddress_ZipCode" AS "Zip1", "c4"."ShippingAddress_ZipCode" AS "Zip2" FROM ( @@ -1149,7 +1149,7 @@ LEFT JOIN ( SELECT "c1"."Id", "c1"."Name", "c1"."BillingAddress_AddressLine1", "c1"."BillingAddress_AddressLine2", "c1"."BillingAddress_Tags", "c1"."BillingAddress_ZipCode", "c1"."BillingAddress_Country_Code", "c1"."BillingAddress_Country_FullName", "c1"."OptionalAddress_AddressLine1", "c1"."OptionalAddress_AddressLine2", "c1"."OptionalAddress_Tags", "c1"."OptionalAddress_ZipCode", "c1"."OptionalAddress_Country_Code", "c1"."OptionalAddress_Country_FullName", "c1"."ShippingAddress_AddressLine1", "c1"."ShippingAddress_AddressLine2", "c1"."ShippingAddress_Tags", "c1"."ShippingAddress_ZipCode", "c1"."ShippingAddress_Country_Code", "c1"."ShippingAddress_Country_FullName" FROM "Customer" AS "c1" ORDER BY "c1"."Id" DESC - LIMIT @p0 + LIMIT @p1 ) AS "c2" ) AS "c4" ON "c3"."Id" = "c4"."Id" """); diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs index fc72d765c07..a0d39d7b99d 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/GearsOfWarQuerySqliteTest.cs @@ -687,7 +687,7 @@ public override async Task Join_entity_with_itself_grouped_by_key_followed_by_in AssertSql( """ -@p0='10' +@p1='10' @p='0' SELECT "s"."Nickname", "s"."SquadId", "s"."AssignedCityName", "s"."CityOfBirthName", "s"."Discriminator", "s"."FullName", "s"."HasSoulPatch", "s"."LeaderNickname", "s"."LeaderSquadId", "s"."Rank", "s"."HasSoulPatch0", "w"."Id", "w"."AmmunitionType", "w"."IsAutomatic", "w"."Name", "w"."OwnerFullName", "w"."SynergyWithId" @@ -701,7 +701,7 @@ SELECT MIN(length("g0"."Nickname")) AS "c", "g0"."HasSoulPatch" GROUP BY "g0"."HasSoulPatch" ) AS "g1" ON length("g"."Nickname") = "g1"."c" ORDER BY "g"."Nickname" - LIMIT @p0 OFFSET @p + LIMIT @p1 OFFSET @p ) AS "s" LEFT JOIN "Weapons" AS "w" ON "s"."FullName" = "w"."OwnerFullName" ORDER BY "s"."Nickname", "s"."SquadId", "s"."HasSoulPatch0" diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindMiscellaneousQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindMiscellaneousQuerySqliteTest.cs index 49eed9eb3a7..542ace8f45a 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindMiscellaneousQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindMiscellaneousQuerySqliteTest.cs @@ -39,7 +39,7 @@ public override async Task Take_Skip(bool async) AssertSql( """ @p='10' -@p0='5' +@p1='5' SELECT "c0"."CustomerID", "c0"."Address", "c0"."City", "c0"."CompanyName", "c0"."ContactName", "c0"."ContactTitle", "c0"."Country", "c0"."Fax", "c0"."Phone", "c0"."PostalCode", "c0"."Region" FROM ( @@ -49,7 +49,7 @@ ORDER BY "c"."ContactName" LIMIT @p ) AS "c0" ORDER BY "c0"."ContactName" -LIMIT -1 OFFSET @p0 +LIMIT -1 OFFSET @p1 """); } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindSelectQuerySqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindSelectQuerySqliteTest.cs index 618bd72ad53..4b96867f894 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindSelectQuerySqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/NorthwindSelectQuerySqliteTest.cs @@ -224,12 +224,12 @@ public override async Task Select_with_multiple_Take(bool async) AssertSql( """ @p='5' -@p0='3' +@p1='3' SELECT "c"."CustomerID", "c"."Address", "c"."City", "c"."CompanyName", "c"."ContactName", "c"."ContactTitle", "c"."Country", "c"."Fax", "c"."Phone", "c"."PostalCode", "c"."Region" FROM "Customers" AS "c" ORDER BY "c"."CustomerID" -LIMIT min(@p, @p0) +LIMIT min(@p, @p1) """); }