Skip to content

Commit 12972d0

Browse files
committed
Use .NET/EF 9.0 GA
1 parent b875f5d commit 12972d0

7 files changed

+63
-6
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
pull_request:
1212

1313
env:
14-
dotnet_sdk_version: '9.0.100-rc.2.24474.11'
14+
dotnet_sdk_version: '9.0.100'
1515
postgis_version: 3
1616
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1717

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- cron: '30 22 * * 6'
2828

2929
env:
30-
dotnet_sdk_version: '9.0.100-rc.2.24474.11'
30+
dotnet_sdk_version: '9.0.100'
3131

3232
jobs:
3333
analyze:

Directory.Packages.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
3-
<EFCoreVersion>[9.0.0-rc.2.24474.1]</EFCoreVersion>
4-
<MicrosoftExtensionsVersion>9.0.0-rc.2.24473.5</MicrosoftExtensionsVersion>
3+
<EFCoreVersion>[9.0.0,10.0.0)</EFCoreVersion>
4+
<MicrosoftExtensionsVersion>9.0.0</MicrosoftExtensionsVersion>
55
<NpgsqlVersion>9.0.0-preview.1-ci.20241028T080028</NpgsqlVersion>
66
</PropertyGroup>
77

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-rc.2.24474.11",
3+
"version": "9.0.100",
44
"rollForward": "latestMajor",
5-
"allowPrerelease": true
5+
"allowPrerelease": false
66
}
77
}

test/EFCore.PG.FunctionalTests/Migrations/MigrationsInfrastructureNpgsqlTest.cs

+13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Migrations
77
public class MigrationsInfrastructureNpgsqlTest(MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture fixture)
88
: MigrationsInfrastructureTestBase<MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture>(fixture)
99
{
10+
// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
11+
public override void Can_generate_no_migration_script()
12+
{
13+
}
14+
15+
// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
16+
public override void Can_generate_migration_from_initial_database_to_initial()
17+
{
18+
}
19+
1020
public override void Can_get_active_provider()
1121
{
1222
base.Can_get_active_provider();
@@ -159,6 +169,9 @@ public override void Can_diff_against_2_1_ASP_NET_Identity_model()
159169
// TODO: Implement
160170
}
161171

172+
protected override Task ExecuteSqlAsync(string value)
173+
=> ((NpgsqlTestStore)Fixture.TestStore).ExecuteNonQueryAsync(value);
174+
162175
public class MigrationsInfrastructureNpgsqlFixture : MigrationsInfrastructureFixtureBase
163176
{
164177
protected override ITestStoreFactory TestStoreFactory

test/EFCore.PG.FunctionalTests/Query/AdHocAdvancedMappingsQueryNpgsqlTest.cs

+15
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,19 @@ public override Task Query_generates_correct_datetimeoffset_parameter_definition
2121
public override Task Projecting_one_of_two_similar_complex_types_picks_the_correct_one()
2222
=> Assert.ThrowsAsync<DbUpdateException>(
2323
() => base.Projecting_one_of_two_similar_complex_types_picks_the_correct_one());
24+
25+
// Cannot write DateTimeOffset with Offset=10:00:00 to PostgreSQL type 'timestamp with time zone', only offset 0 (UTC) is supported.
26+
public override Task Projecting_expression_with_converter_with_closure(bool async)
27+
=> Assert.ThrowsAsync<DbUpdateException>(
28+
() => base.Projecting_one_of_two_similar_complex_types_picks_the_correct_one());
29+
30+
// Cannot write DateTimeOffset with Offset=10:00:00 to PostgreSQL type 'timestamp with time zone', only offset 0 (UTC) is supported.
31+
public override Task Projecting_property_with_converter_with_closure(bool async)
32+
=> Assert.ThrowsAsync<DbUpdateException>(
33+
() => base.Projecting_one_of_two_similar_complex_types_picks_the_correct_one());
34+
35+
// Cannot write DateTimeOffset with Offset=10:00:00 to PostgreSQL type 'timestamp with time zone', only offset 0 (UTC) is supported.
36+
public override Task Projecting_property_with_converter_without_closure(bool async)
37+
=> Assert.ThrowsAsync<DbUpdateException>(
38+
() => base.Projecting_one_of_two_similar_complex_types_picks_the_correct_one());
2439
}

test/EFCore.PG.FunctionalTests/Query/AdHocPrecompiledQueryNpgsqlTest.cs

+29
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,35 @@ LIMIT 2
6969
""");
7070
}
7171

72+
public override async Task Projecting_property_requiring_converter_with_closure_is_not_supported()
73+
{
74+
await base.Projecting_property_requiring_converter_with_closure_is_not_supported();
75+
76+
AssertSql();
77+
}
78+
79+
public override async Task Projecting_expression_requiring_converter_without_closure_works()
80+
{
81+
await base.Projecting_expression_requiring_converter_without_closure_works();
82+
83+
AssertSql(
84+
"""
85+
SELECT b."AudiobookDate"
86+
FROM "Books" AS b
87+
""");
88+
}
89+
90+
public override async Task Projecting_entity_with_property_requiring_converter_with_closure_works()
91+
{
92+
await base.Projecting_entity_with_property_requiring_converter_with_closure_works();
93+
94+
AssertSql(
95+
"""
96+
SELECT b."Id", b."AudiobookDate", b."Name", b."PublishDate"
97+
FROM "Books" AS b
98+
""");
99+
}
100+
72101
[ConditionalFact]
73102
public virtual void Check_all_tests_overridden()
74103
=> TestHelpers.AssertAllMethodsOverridden(GetType());

0 commit comments

Comments
 (0)