diff --git a/Dependencies.targets b/Dependencies.targets index e21a82c..706abb8 100644 --- a/Dependencies.targets +++ b/Dependencies.targets @@ -1,7 +1,7 @@ - 6.0.10 - [7.0.5, 8.0.0) + 6.0.19 + [7.0.8, 8.0.0) @@ -41,10 +41,10 @@ - - - - + + + + @@ -81,7 +81,7 @@ - + diff --git a/test/EFCore.Jet.FunctionalTests/Query/FunkyDataQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/FunkyDataQueryJetTest.cs index 23a4310..477e992 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/FunkyDataQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/FunkyDataQueryJetTest.cs @@ -286,34 +286,34 @@ WHERE 0 = 1"); WHERE (`f`.`FirstName` IS NOT NULL) AND (`f`.`FirstName` LIKE 'B[[][[]a[^]%') """, // - """ + $""" @__prm1_0='[' (Size = 255) @__prm1_0='[' (Size = 255) @__prm1_0='[' (Size = 255) SELECT `f`.`Id`, `f`.`FirstName`, `f`.`LastName`, `f`.`NullableBool` FROM `FunkyCustomers` AS `f` - WHERE @__prm1_0 = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN(@__prm1_0)) = @__prm1_0) + WHERE {AssertSqlHelper.Parameter("@__prm1_0")} = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN({AssertSqlHelper.Parameter("@__prm1_0")})) = {AssertSqlHelper.Parameter("@__prm1_0")}) """, // - """ + $""" @__prm2_0='B[' (Size = 255) @__prm2_0='B[' (Size = 255) @__prm2_0='B[' (Size = 255) SELECT `f`.`Id`, `f`.`FirstName`, `f`.`LastName`, `f`.`NullableBool` FROM `FunkyCustomers` AS `f` - WHERE @__prm2_0 = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN(@__prm2_0)) = @__prm2_0) + WHERE {AssertSqlHelper.Parameter("@__prm2_0")} = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN({AssertSqlHelper.Parameter("@__prm2_0")})) = {AssertSqlHelper.Parameter("@__prm2_0")}) """, // - """ + $""" @__prm3_0='B[[a^' (Size = 255) @__prm3_0='B[[a^' (Size = 255) @__prm3_0='B[[a^' (Size = 255) SELECT `f`.`Id`, `f`.`FirstName`, `f`.`LastName`, `f`.`NullableBool` FROM `FunkyCustomers` AS `f` - WHERE @__prm3_0 = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN(@__prm3_0)) = @__prm3_0) + WHERE {AssertSqlHelper.Parameter("@__prm3_0")} = '' OR ((`f`.`FirstName` IS NOT NULL) AND LEFT(`f`.`FirstName`, LEN({AssertSqlHelper.Parameter("@__prm3_0")})) = {AssertSqlHelper.Parameter("@__prm3_0")}) """, // """ diff --git a/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs index 297d966..7797a66 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs @@ -8719,13 +8719,14 @@ WHERE `g`.`HasSoulPatch` = TRUE AND `g`.`HasSoulPatch` IN (FALSE, TRUE) await base.Parameter_used_multiple_times_take_appropriate_inferred_type_mapping(async); AssertSql( -""" + """ @__place_0='Seattle' (Size = 255) @__place_0_1='Seattle' (Size = 100) +@__place_0_1='Seattle' (Size = 100) SELECT `c`.`Name`, `c`.`Location`, `c`.`Nation` FROM `Cities` AS `c` -WHERE `c`.`Nation` = @__place_0 OR `c`.`Location` = @__place_0_1 +WHERE `c`.`Nation` = @__place_0 OR `c`.`Location` = @__place_0_1 OR `c`.`Location` = @__place_0_1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindKeylessEntitiesQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindKeylessEntitiesQueryJetTest.cs index 28773b6..86b2a72 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindKeylessEntitiesQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindKeylessEntitiesQueryJetTest.cs @@ -18,7 +18,7 @@ namespace EntityFrameworkCore.Jet.FunctionalTests.Query : base(fixture) { ClearLog(); - //Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); + Fixture.TestSqlLoggerFactory.SetTestOutputHelper(testOutputHelper); } protected override bool CanExecuteQueryString @@ -86,11 +86,13 @@ WHERE (({AssertSqlHelper.Parameter("@__ef_filter___searchTerm_1")} = '') OR (`c` await base.KeylessEntity_with_mixed_tracking(isAsync); AssertSql( - $@"SELECT `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region`, `o`.`CustomerID` -FROM `Customers` AS `c` -INNER JOIN ( - select * from ""Orders"" -) AS `o` ON `c`.`CustomerID` = `o`.`CustomerID`"); + """ + SELECT `c`.`CustomerID`, `c`.`Address`, `c`.`City`, `c`.`CompanyName`, `c`.`ContactName`, `c`.`ContactTitle`, `c`.`Country`, `c`.`Fax`, `c`.`Phone`, `c`.`PostalCode`, `c`.`Region`, `m`.`CustomerID` + FROM `Customers` AS `c` + INNER JOIN ( + select * from `Orders` + ) AS `m` ON `c`.`CustomerID` = `m`.`CustomerID` + """); } public override async Task KeylessEntity_with_defining_query(bool isAsync) @@ -98,11 +100,13 @@ INNER JOIN ( await base.KeylessEntity_with_defining_query(isAsync); AssertSql( - $@"SELECT `o`.`CustomerID` + """ +SELECT `m`.`CustomerID` FROM ( - select * from ""Orders"" -) AS `o` -WHERE `o`.`CustomerID` = 'ALFKI'"); + select * from `Orders` +) AS `m` +WHERE `m`.`CustomerID` = 'ALFKI' +"""); } public override async Task KeylessEntity_with_defining_query_and_correlated_collection(bool isAsync) @@ -117,12 +121,14 @@ WHERE `o`.`CustomerID` = 'ALFKI'"); await base.KeylessEntity_select_where_navigation(isAsync); AssertSql( - $@"SELECT `o`.`CustomerID` -FROM ( - select * from ""Orders"" -) AS `o` -LEFT JOIN `Customers` AS `c` ON `o`.`CustomerID` = `c`.`CustomerID` -WHERE `c`.`City` = 'Seattle'"); + """ + SELECT `m`.`CustomerID` + FROM ( + select * from `Orders` + ) AS `m` + LEFT JOIN `Customers` AS `c` ON `m`.`CustomerID` = `c`.`CustomerID` + WHERE `c`.`City` = 'Seattle' + """); } public override async Task KeylessEntity_select_where_navigation_multi_level(bool isAsync) @@ -130,15 +136,17 @@ WHERE `c`.`City` = 'Seattle'"); await base.KeylessEntity_select_where_navigation_multi_level(isAsync); AssertSql( - $@"SELECT `o`.`CustomerID` -FROM ( - select * from ""Orders"" -) AS `o` -LEFT JOIN `Customers` AS `c` ON `o`.`CustomerID` = `c`.`CustomerID` -WHERE EXISTS ( - SELECT 1 - FROM `Orders` AS `o0` - WHERE `c`.`CustomerID` IS NOT NULL AND (`c`.`CustomerID` = `o0`.`CustomerID`))"); + """ + SELECT `m`.`CustomerID` + FROM ( + select * from `Orders` + ) AS `m` + LEFT JOIN `Customers` AS `c` ON `m`.`CustomerID` = `c`.`CustomerID` + WHERE EXISTS ( + SELECT 1 + FROM `Orders` AS `o` + WHERE (`c`.`CustomerID` IS NOT NULL) AND `c`.`CustomerID` = `o`.`CustomerID`) + """); } [ConditionalFact] diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs index 99a98b8..582c86d 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindMiscellaneousQueryJetTest.cs @@ -3956,11 +3956,11 @@ FROM ( """ @__prefix_0='A' (Size = 255) @__prefix_0_1='A' (Size = 5) -@__prefix_0='A' (Size = 255) +@__prefix_0_1='A' (Size = 5) SELECT `c`.`CustomerID` FROM `Customers` AS `c` -WHERE @__prefix_0 = '' OR LEFT(`c`.`CustomerID`, LEN(@__prefix_0_1)) = @__prefix_0 +WHERE @__prefix_0 = '' OR LEFT(`c`.`CustomerID`, LEN(@__prefix_0_1)) = @__prefix_0_1 """); } diff --git a/test/EFCore.Jet.FunctionalTests/Query/NorthwindQueryJetFixture.cs b/test/EFCore.Jet.FunctionalTests/Query/NorthwindQueryJetFixture.cs index 5e14db2..98262e8 100644 --- a/test/EFCore.Jet.FunctionalTests/Query/NorthwindQueryJetFixture.cs +++ b/test/EFCore.Jet.FunctionalTests/Query/NorthwindQueryJetFixture.cs @@ -50,6 +50,10 @@ namespace EntityFrameworkCore.Jet.FunctionalTests.Query modelBuilder.Entity() .Property(p => p.UnitPrice) .HasColumnType("money"); + + //Override inherited query of : select * from ""Orders"" + //This is needed as the " character does not work for surrounding table/entity names on OleDb + modelBuilder.Entity().ToSqlQuery(@"select * from `Orders`"); } } }