Update dependencies and some test fixes

pull/139/head
Christopher Jolly 3 years ago
parent 1e73673f05
commit 61b277d11c

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<DotnetRuntimeVersion>6.0.10</DotnetRuntimeVersion>
<EFCoreVersion>[7.0.5, 8.0.0)</EFCoreVersion>
<DotnetRuntimeVersion>6.0.19</DotnetRuntimeVersion>
<EFCoreVersion>[7.0.8, 8.0.0)</EFCoreVersion>
</PropertyGroup>
<ItemGroup>
@ -41,10 +41,10 @@
<PackageReference Update="System.Data.OleDb" Version="7.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Update="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Update="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Update="coverlet.collector" Version="3.2.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Update="MSTest.TestAdapter" Version="3.0.4" />
<PackageReference Update="MSTest.TestFramework" Version="3.0.4" />
<PackageReference Update="coverlet.collector" Version="6.0.0" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.3" />
<!-- EntityFrameworkCore.Jet.Data.Tests -->
@ -81,7 +81,7 @@
<!--<PackageReference Update="coverlet.collector" Version="$(CoverletCollector)" />-->
<!-- EFCore.Jet.Tests -->
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
<PackageReference Update="Moq" Version="4.18.4" />
<!--<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(MicrosoftEntityFrameworkCoreDesignVersion)" />-->

@ -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")})
""",
//
"""

@ -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
""");
}

@ -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]

@ -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
""");
}

@ -50,6 +50,10 @@ namespace EntityFrameworkCore.Jet.FunctionalTests.Query
modelBuilder.Entity<MostExpensiveProduct>()
.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<OrderQuery>().ToSqlQuery(@"select * from `Orders`");
}
}
}

Loading…
Cancel
Save