Skip to content

Commit

Permalink
Depend on EF 9.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Jan 17, 2025
1 parent 2e59bf5 commit 88e4dd6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<EFCoreVersion>[9.0.0,10.0.0)</EFCoreVersion>
<MicrosoftExtensionsVersion>9.0.0</MicrosoftExtensionsVersion>
<EFCoreVersion>[9.0.1,10.0.0)</EFCoreVersion>
<MicrosoftExtensionsVersion>9.0.1</MicrosoftExtensionsVersion>
<NpgsqlVersion>9.0.2</NpgsqlVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Migrations
public class MigrationsInfrastructureNpgsqlTest(MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture fixture)
: MigrationsInfrastructureTestBase<MigrationsInfrastructureNpgsqlTest.MigrationsInfrastructureNpgsqlFixture>(fixture)
{
// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
public override void Can_generate_no_migration_script()
{
}

// TODO: Remove once we sync to https://github.com/dotnet/efcore/pull/35106
public override void Can_generate_migration_from_initial_database_to_initial()
{
}

public override void Can_get_active_provider()
{
base.Can_get_active_provider();

Assert.Equal("Npgsql.EntityFrameworkCore.PostgreSQL", ActiveProvider);
}

// See #3407
public override void Can_apply_two_migrations_in_transaction()
=> Assert.ThrowsAny<Exception>(() => base.Can_apply_two_migrations_in_transaction());

// See #3407
public override Task Can_apply_two_migrations_in_transaction_async()
=> Assert.ThrowsAnyAsync<Exception>(() => base.Can_apply_two_migrations_in_transaction_async());

[ConditionalFact(Skip = "https://github.com/dotnet/efcore/issues/33056")]
public override void Can_apply_all_migrations()
=> base.Can_apply_all_migrations();
Expand Down
4 changes: 2 additions & 2 deletions test/EFCore.PG.FunctionalTests/Query/EnumQueryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ await AssertQuery(

AssertSql(
"""
@values={ 'Sad' } (DbType = Object)
@__values_0={ 'Sad' } (DbType = Object)
SELECT s."Id", s."ByteEnum", s."EnumValue", s."InferredEnum", s."MappedEnum", s."SchemaQualifiedEnum", s."UnmappedByteEnum", s."UnmappedEnum", s."UppercaseNamedEnum"
FROM test."SomeEntities" AS s
WHERE s."UppercaseNamedEnum" = ANY (@values)
WHERE s."UppercaseNamedEnum" = ANY (@__values_0)
""");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,28 @@ await AssertQuery(
""");
}

public override async Task Parameter_collection_ImmutableArray_of_ints_Contains_int(bool async)
{
await base.Parameter_collection_ImmutableArray_of_ints_Contains_int(async);

AssertSql(
"""
@__ints_0={ '10', '999' } (Nullable = false) (DbType = Object)
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings"
FROM "PrimitiveCollectionsEntity" AS p
WHERE p."Int" = ANY (@__ints_0)
""",
//
"""
@__ints_0={ '10', '999' } (Nullable = false) (DbType = Object)
SELECT p."Id", p."Bool", p."Bools", p."DateTime", p."DateTimes", p."Enum", p."Enums", p."Int", p."Ints", p."NullableInt", p."NullableInts", p."NullableString", p."NullableStrings", p."String", p."Strings"
FROM "PrimitiveCollectionsEntity" AS p
WHERE NOT (p."Int" = ANY (@__ints_0) AND p."Int" = ANY (@__ints_0) IS NOT NULL)
""");
}

public override async Task Parameter_collection_of_ints_Contains_nullable_int(bool async)
{
await base.Parameter_collection_of_ints_Contains_nullable_int(async);
Expand Down

0 comments on commit 88e4dd6

Please sign in to comment.