Skip to content

Enable nullability in relational and design tests - #38790

Merged
AndriySvyryd merged 1 commit into
mainfrom
issue24427-nrt-3-relational-design
Aug 12, 2026
Merged

Enable nullability in relational and design tests#38790
AndriySvyryd merged 1 commit into
mainfrom
issue24427-nrt-3-relational-design

Conversation

@AndriySvyryd

@AndriySvyryd AndriySvyryd commented Aug 12, 2026

Copy link
Copy Markdown
Member

Part 3 of 5 for #24427. Based on #38789.

Summary

  • Enables nullable analysis in relational specification tests, relational unit tests, and design tests.
  • Preserves optionality in migration/model snapshot fixtures instead of updating generated-code expectations.
  • Restores seed validation, table-splitting, JSON, migration differ, and compiled-model behavior under NRT.
  • Carries the shared Northwind contracts required by relational tests.

Stack

  1. Enable nullability in benchmarks and core tests #38788
  2. Enable nullability in provider tests #38789
  3. Enable nullability in relational and design tests #38790 (this PR)
  4. Enable nullability in shared specification tests #38791
  5. Enable nullability in shared test sources #38792

Validation

  • Full EFCore.slnx build at this tip: 0 warnings, 0 errors.
  • Relational tests: 1,481 total, 0 failed.
  • Design tests: 1,270 total, 0 failed.
  • HierarchyId tests: 96 total, 0 failed with original migration baselines.
  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow the required format
  • Tests for the changes have been added or existing coverage validates the migration
  • Code follows the same patterns and style as existing code in this repo

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables C# nullable reference type (NRT) analysis across relational specification/unit tests and EFCore design tests, updating test models and infrastructure so the projects build warning-free while preserving existing test semantics and baselines.

Changes:

  • Turned on nullable analysis for relational and design test projects (removing per-project and per-file nullable opt-outs).
  • Annotated test entities/fixtures/utilities with ?, null!, and related signature updates to match runtime nullability expectations.
  • Adjusted specific relational/specification behaviors (e.g., JSON/seed/migrations-related tests) to keep optionality/behavior stable under NRT.

Reviewed changes

Copilot reviewed 245 out of 247 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/EFCore.Specification.Tests/TestModels/Northwind/Customer.cs Annotates Northwind customer model for NRT (nullable properties/initializers).
test/EFCore.Specification.Tests/Query/NorthwindDbFunctionsQueryTestBase.cs Updates client-side predicates for NRT compatibility in Like-related tests.
test/EFCore.Relational.Tests/ValueGeneration/TemporaryStringValueGeneratorTest.cs NRT fixups for value generator test invocation.
test/EFCore.Relational.Tests/ValueGeneration/TemporaryDateTimeValueGeneratorTest.cs NRT fixups for value generator test invocation.
test/EFCore.Relational.Tests/ValueGeneration/TemporaryDateTimeOffsetValueGeneratorTest.cs NRT fixups for value generator test invocation.
test/EFCore.Relational.Tests/ValueGeneration/TemporaryBinaryValueGeneratorTest.cs NRT fixups for value generator test invocation.
test/EFCore.Relational.Tests/Update/ModificationCommandComparerTest.cs Makes schema parameter nullable for NRT correctness.
test/EFCore.Relational.Tests/Update/BatchExecutorTest.cs Initializes DbSets/keys with null! under NRT.
test/EFCore.Relational.Tests/TestUtilities/TestRelationalTypeMappingSource.cs Updates overrides to nullable return/arg shapes consistent with base APIs.
test/EFCore.Relational.Tests/TestUtilities/TestRelationalMigrationSqlGenerator.cs Makes IModel parameters nullable in overrides per NRT annotations.
test/EFCore.Relational.Tests/TestUtilities/TestProviderCodeGenerator.cs Adjusts nullable provider options/action signatures for NRT.
test/EFCore.Relational.Tests/TestUtilities/ListDiagnosticSource.cs Adjusts DiagnosticSource.Write nullability handling under NRT.
test/EFCore.Relational.Tests/TestUtilities/FakeRelationalCommandDiagnosticsLogger.cs Removes redundant file-level nullable directive as project NRT is enabled.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeRelationalOptionsExtension.cs Makes extension info nullable and uses null! where DI expects a value.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeRelationalDbContextOptionsExtension.cs Makes optional configuration delegates nullable.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeRelationalConnection.cs Makes options/transaction nullable and adds null-forgiving where required.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeDbParameter.cs Adds AllowNull + nullable Value to satisfy DbParameter contract under NRT.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeDbDataReader.cs Updates reader fields/args to nullable and adds null-forgiving where safe.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeDbConnection.cs Updates connection properties and optional collaborators for NRT.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeDbCommand.cs Updates DbCommand overrides/signatures for NRT; adds null-forgiving in a few places.
test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeCommandExecutor.cs Makes delegates/return values nullable where execution can return null.
test/EFCore.Relational.Tests/TestUtilities/FakeDiagnosticsLogger.cs Aligns ILogger-like signatures with nullable exception/scope patterns.
test/EFCore.Relational.Tests/Storage/RelationalTypeMappingTest.cs Adds null-forgiving for reflection and converter delegates under NRT.
test/EFCore.Relational.Tests/Storage/RelationalTypeMappingSourceTestBase.cs Adds nullability to optional args and null-forgiving for Find* APIs.
test/EFCore.Relational.Tests/Storage/RelationalParameterBuilderTest.cs Uses null-forgiving for mappings/properties that tests expect present.
test/EFCore.Relational.Tests/Storage/RelationalGeometryTypeMappingTest.cs Initializes required abstract property with null! for test stub.
test/EFCore.Relational.Tests/Storage/RelationalDataReaderTest.cs Updates parameter dictionary and optional args for NRT.
test/EFCore.Relational.Tests/Storage/NamedConnectionStringResolverTest.cs Updates configuration/service provider nullability in test doubles.
test/EFCore.Relational.Tests/RelationalConnectionTest.cs Adds null-forgiving for GetService results and nullable-returning members.
test/EFCore.Relational.Tests/Query/Internal/BufferedDataReaderTest.cs Adds null-forgiving for reflection invocations under NRT.
test/EFCore.Relational.Tests/Migrations/MigrationCommandExecutorTest.cs Updates optional args for NRT in helper factory methods.
test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTestBase.cs Makes optional delegates nullable.
test/EFCore.Relational.Tests/Migrations/Internal/MigrationsAssemblyTest.cs Makes optional logger nullable.
test/EFCore.Relational.Tests/Metadata/TriggerTest.cs Initializes required string property with null!.
test/EFCore.Relational.Tests/Metadata/RelationalPropertyAttributeConventionTest.cs Adds null-forgiving for builder APIs returning nullable.
test/EFCore.Relational.Tests/Metadata/RelationalJsonIndexTest.cs Removes redundant file-level nullable directive as project NRT is enabled.
test/EFCore.Relational.Tests/Metadata/RelationalEntityTypeAttributeConventionTest.cs Adds null-forgiving for builder APIs returning nullable.
test/EFCore.Relational.Tests/Metadata/Conventions/Internal/TableValuedDbFunctionConventionTest.cs Adds null-forgiving for reflection/model APIs returning nullable.
test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs Adds explicit optionality mappings and initializes required members for NRT.
test/EFCore.Relational.Tests/Extensions/RelationalTransactionExtensionsTest.cs Makes optional optionsExtension nullable.
test/EFCore.Relational.Tests/Extensions/RelationalMetadataExtensionsTest.cs Adds null-forgiving for Get* methods which can return null.
test/EFCore.Relational.Tests/Extensions/RelationalDatabaseFacadeExtensionsTest.cs Makes transaction/context members nullable and adjusts parameter types.
test/EFCore.Relational.Tests/EFCore.Relational.Tests.csproj Removes <Nullable>disable</Nullable> to enable NRT for the project.
test/EFCore.Relational.Tests/Design/AnnotationCodeGeneratorTest.cs Adds null-forgiving to model lookups that are expected to succeed.
test/EFCore.Relational.Tests/DbSetAsTableNameTest.cs Initializes DbSets with null! under NRT.
test/EFCore.Relational.Specification.Tests/Update/UpdatesRelationalTestBase.cs Removes file nullable opt-out; adjusts HasBaseType null literal typing.
test/EFCore.Relational.Specification.Tests/Update/UpdateSqlGeneratorTestBase.cs Removes nullable opt-out; updates FindProperty calls and model types for NRT.
test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationTestBase.cs Removes nullable opt-out; makes second nullable under NRT.
test/EFCore.Relational.Specification.Tests/Update/StoreValueGenerationFixtureBase.cs Removes file nullable opt-out.
test/EFCore.Relational.Specification.Tests/Update/StoredProcedureUpdateTestBase.cs Removes nullable opt-out; makes string properties nullable.
test/EFCore.Relational.Specification.Tests/Update/JsonUpdateFixtureBase.cs Removes nullable opt-out; adds explicit optionality to preserve model semantics under NRT.
test/EFCore.Relational.Specification.Tests/TwoDatabasesTestBase.cs Removes nullable opt-out; adjusts interceptor/context nullability.
test/EFCore.Relational.Specification.Tests/TransactionTestBase.cs Removes nullable opt-out; adjusts locals/Equals signature for NRT.
test/EFCore.Relational.Specification.Tests/TransactionInterceptionTestBase.cs Removes nullable opt-out; adds null-forgiving for event id name lookups and transaction results.
test/EFCore.Relational.Specification.Tests/TPTTableSplittingTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestUtilities/RelationalModelAsserter.cs Removes nullable opt-out; makes asserter parameters nullable and adds null asserts.
test/EFCore.Relational.Specification.Tests/TestModels/StoreValueGenerationModel/StoreValueGenerationContext.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentNestedJsonSomeRequired.cs Removes nullable opt-out; makes optional string property nullable.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentNestedJsonAllOptional.cs Removes nullable opt-out; makes optional string property nullable.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentJsonSomeRequired.cs Removes nullable opt-out; annotates optional nested navs and initializes required navs.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentJsonAllOptional.cs Removes nullable opt-out; annotates optional nested navs.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentEntitySomeRequired.cs Removes nullable opt-out; makes Name/Json nullable.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentEntityAllOptional.cs Removes nullable opt-out; makes Name/Json nullable.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentData.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/OptionalDependent/OptionalDependentContext.cs Removes nullable opt-out; initializes DbSets with null!.
test/EFCore.Relational.Specification.Tests/TestModels/Operators/OperatorsData.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/Operators/OperatorsContext.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/Operators/OperatorEntityString.cs Removes nullable opt-out; makes Value nullable.
test/EFCore.Relational.Specification.Tests/TestModels/Operators/OperatorEntityNullableDateTimeOffset.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/Operators/OperatorEntityDateTimeOffset.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/Northwind/NorthwindRelationalContext.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/Northwind/MostExpensiveProduct.cs Removes nullable opt-out; makes string result column nullable.
test/EFCore.Relational.Specification.Tests/TestModels/Northwind/CustomerOrderHistory.cs Removes nullable opt-out; makes string result column nullable.
test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/EntitySplittingTypes.cs Removes nullable opt-out; annotates optional members to preserve model semantics.
test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/EntitySplittingData.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/TestModels/EntitySplitting/EntitySplittingContext.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/StoreGeneratedFixupRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/RelationalServiceCollectionExtensionsTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/RelationalComplianceTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/WarningsTestBase.cs Removes nullable opt-out; adds null-forgiving for FirstOrDefault/LastOrDefault results.
test/EFCore.Relational.Specification.Tests/Query/SqlExecutorTestBase.cs Removes nullable opt-out; adds null-forgiving for null DbParameter name test.
test/EFCore.Relational.Specification.Tests/Query/SpatialQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/SpatialQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/SharedTypeQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/RelationalNorthwindDbFunctionsQueryTestBase.cs Removes nullable opt-out; adds null-forgiving around nullable ContactName usage.
test/EFCore.Relational.Specification.Tests/Query/QueryNoClientEvalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/QueryFilterFuncletizationRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/PrimitiveCollectionsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/OwnedQueryRelationalTestBase.cs Removes nullable opt-out; adds null-forgiving for owned navigation chains.
test/EFCore.Relational.Specification.Tests/Query/OptionalDependentQueryTestBase.cs Removes nullable opt-out; adds null-forgiving for optional JSON access in predicates.
test/EFCore.Relational.Specification.Tests/Query/OptionalDependentQueryFixtureBase.cs Removes nullable opt-out; updates sorters/asserters for nullable object flow.
test/EFCore.Relational.Specification.Tests/Query/OperatorsQueryTestBase.cs Adds null-forgiving where operator entities now have nullable string Value.
test/EFCore.Relational.Specification.Tests/Query/OperatorsProceduralQueryTestBase.cs Removes nullable opt-out; adds null-forgiving for reflection and default literals.
test/EFCore.Relational.Specification.Tests/Query/NullSemanticsQueryFixtureBase.cs Removes nullable opt-out; updates sorters/asserters for nullable object flow.
test/EFCore.Relational.Specification.Tests/Query/NorthwindWhereQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindSqlQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindSplitIncludeQueryTestBase.cs Removes nullable opt-out; adds null-forgiving for reflected method lookup.
test/EFCore.Relational.Specification.Tests/Query/NorthwindSplitIncludeNoTrackingQueryTestBase.cs Removes nullable opt-out; adds null-forgiving for navigation usage.
test/EFCore.Relational.Specification.Tests/Query/NorthwindSetOperationsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindSelectQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindNavigationsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindMiscellaneousQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindKeylessEntitiesQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindJoinQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindIncludeQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindGroupByQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindFunctionsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/NorthwindAggregateOperatorsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/MappingQueryTestBase.cs Removes nullable opt-out; annotates mapped members for NRT.
test/EFCore.Relational.Specification.Tests/Query/ManyToManyQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ManyToManyQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ManyToManyNoTrackingQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/JsonQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/InheritanceRelationshipsQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTRelationshipsQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTRelationshipsQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTManyToManyQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTManyToManyQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTManyToManyNoTrackingQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTInheritanceQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTInheritanceQueryFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTGearsOfWarQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTGearsOfWarQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPTFiltersInheritanceQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPHInheritanceQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPHInheritanceQueryFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCRelationshipsQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCRelationshipsQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCManyToManyQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCManyToManyQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCManyToManyNoTrackingQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCInheritanceQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCInheritanceQueryFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCGearsOfWarQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCGearsOfWarQueryRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/Inheritance/TPCFiltersInheritanceQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/GearsOfWarQueryRelationalFixture.cs Removes nullable opt-out; updates shadow mapping delegate nullability.
test/EFCore.Relational.Specification.Tests/Query/GearsOfWarFromSqlQueryTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/FromSqlSprocQueryTestBase.cs Removes nullable opt-out; adds null-forgiving for nullable string projections.
test/EFCore.Relational.Specification.Tests/Query/CompositeKeysSplitQueryRelationalTestBase.cs Removes nullable opt-out; adds null-forgiving for method lookup.
test/EFCore.Relational.Specification.Tests/Query/CompositeKeysQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/CompositeKeysQueryRelationalFixtureBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexTypeQueryRelationalTestBase.cs Removes nullable opt-out; tightens nullable regions within the file.
test/EFCore.Relational.Specification.Tests/Query/ComplexTypeQueryRelationalFixtureBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsSharedTypeQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsSharedTypeQueryRelationalFixtureBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsQueryRelationalFixtureBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsCollectionsSplitSharedTypeQueryRelationalTestBase.cs Removes nullable opt-out; adds null-forgiving for method lookup.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsCollectionsSplitQueryRelationalTestBase.cs Removes nullable opt-out; adds null-forgiving for method lookup.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsCollectionsSharedTypeQueryRelationalTestBase.cs Removes nullable opt-out; formatting-only update for NRT-friendly lambda.
test/EFCore.Relational.Specification.Tests/Query/ComplexNavigationsCollectionsQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/AdHocQueryFiltersQueryRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Query/AdHocNavigationsQueryRelationalTestBase.cs Removes nullable opt-out; initializes DbSets and navs for NRT.
test/EFCore.Relational.Specification.Tests/Query/AdHocAdvancedMappingsQueryRelationalTestBase.cs Removes nullable opt-out; adds null-forgiving for nested optional members.
test/EFCore.Relational.Specification.Tests/PropertyValuesRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/OptimisticConcurrencyRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/ModelBuilding101TestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs Removes nullable opt-out; updates options/services/model nullability and null! values arrays.
test/EFCore.Relational.Specification.Tests/Migrations/MigrationsInfrastructureTestBase.cs Removes nullable opt-out; makes Sql/provider fields nullable and initializes DbSets.
test/EFCore.Relational.Specification.Tests/ManyToManyTrackingRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/LoggingRelationalTestBase.cs Removes nullable opt-out; adjusts null literal typing and delegate nullability.
test/EFCore.Relational.Specification.Tests/F1RelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/EntitySplittingTestBase.cs Removes nullable opt-out; makes factory nullable and initializes DbSets/strings as nullable.
test/EFCore.Relational.Specification.Tests/DesignTimeTestBase.cs Removes nullable opt-out; adds null-forgiving for reflection attributes.
test/EFCore.Relational.Specification.Tests/DataAnnotationRelationalTestBase.cs Removes nullable opt-out; initializes collections and marks optional members nullable.
test/EFCore.Relational.Specification.Tests/ConnectionInterceptionTestBase.cs Adds null-forgiving for event id name lookups in assertions.
test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorEnabledRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/ConcurrencyDetectorDisabledRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/NorthwindBulkUpdatesRelationalFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/NonSharedModelBulkUpdatesRelationalTestBase.cs Removes nullable opt-out; makes string optional and initializes complex member.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPTInheritanceBulkUpdatesTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPTInheritanceBulkUpdatesFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPTFiltersInheritanceBulkUpdatesTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPHInheritanceBulkUpdatesTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPHInheritanceBulkUpdatesFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPCInheritanceBulkUpdatesTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPCInheritanceBulkUpdatesFixture.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/TPCFiltersInheritanceBulkUpdatesTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/InheritanceBulkUpdatesRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/InheritanceBulkUpdatesRelationalFixtureBase.cs Removes nullable opt-out.
test/EFCore.Relational.Specification.Tests/BulkUpdates/Inheritance/FiltersInheritanceBulkUpdatesRelationalTestBase.cs Removes nullable opt-out.
test/EFCore.Design.Tests/TestUtilities/TestMigrationsOperations.cs Makes ctor args nullable per NRT.
test/EFCore.Design.Tests/TestUtilities/TestDbContextOperations.cs Makes ctor args nullable per NRT.
test/EFCore.Design.Tests/TestUtilities/DatabaseTableRef.cs Makes schema/comments/PK/model nullable for NRT.
test/EFCore.Design.Tests/TestUtilities/DatabaseColumnRef.cs Makes store type/sql/comments nullable for NRT.
test/EFCore.Design.Tests/Scaffolding/Internal/TextTemplatingModelGeneratorTest.cs Adds null-forgiving for Path.GetDirectoryName under NRT.
test/EFCore.Design.Tests/Scaffolding/Internal/ScaffoldingTypeMapperSqlServerTest.cs Allows mapping to be nullable and asserts non-null.
test/EFCore.Design.Tests/Scaffolding/Internal/ScaffoldingTypeMapperSqliteTest.cs Allows mapping to be nullable and asserts non-null.
test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineerScaffolderTest.cs Initializes non-nullable properties with null! where required.
test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestFixture.cs Adds null-forgiving for embedded resource streams.
test/EFCore.Design.Tests/Scaffolding/Internal/ModelCodeGeneratorTestBase.cs Makes assert callbacks optional; tightens null handling when creating context.
test/EFCore.Design.Tests/Scaffolding/Internal/HumanizerPluralizerTest.cs Updates test signatures for NRT and uses null-forgiving for null InlineData.
test/EFCore.Design.Tests/Query/LinqToCSharpSyntaxTranslatorTest.cs Removes redundant file-level nullable directive.
test/EFCore.Design.Tests/Query/CSharpToLinqTranslatorTest.cs Removes redundant file-level nullable directive.
test/EFCore.Design.Tests/Migrations/Design/SnapshotModelProcessorTest.cs Adds null-forgiving for navigation/model annotation lookups and initializes collections.
test/EFCore.Design.Tests/Migrations/Design/MigrationScaffolderTest.cs Uses null! for test stubs returning null under NRT.
test/EFCore.Design.Tests/Migrations/Design/MigrationsBundleTest.cs Makes traversal variable nullable and adds null-forgiving for command names.
test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTestBase.cs Adds null-forgiving for reflection and required service lookups under NRT.
test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationsGeneratorTest.cs Adds null-forgiving for FindEntityType/reflection and null! in Values arrays.
test/EFCore.Design.Tests/Migrations/Design/CSharpMigrationOperationGeneratorTest.cs Uses null! in Values arrays and adds null-forgiving for reflection assertions.
test/EFCore.Design.Tests/Extensions/MethodCallCodeFragmentExtensionsTest.cs Adds null-forgiving for reflection GetRuntimeMethod results.
test/EFCore.Design.Tests/EFCore.Design.Tests.csproj Removes <Nullable>disable</Nullable> to enable NRT for the project.
test/EFCore.Design.Tests/DesignApiConsistencyTest.cs Adds null-forgiving to reflection calls returning nullable.
test/EFCore.Design.Tests/Design/OperationReportHandlerTest.cs Makes local string results nullable.
test/EFCore.Design.Tests/Design/OperationExecutorTest.cs Removes redundant file-level nullable directive.
test/EFCore.Design.Tests/Design/Internal/OperationLoggerTest.cs Uses null! where test intentionally passes null state.
test/EFCore.Design.Tests/Design/Internal/MigrationsOperationsTest.cs Initializes static assembly property with null!.
test/EFCore.Design.Tests/Design/Internal/LanguageBasedSelectorTests.cs Makes language nullable in test service implementation.
test/EFCore.Design.Tests/Design/Internal/DbContextOperationsTest.cs Adds null-forgiving for FullName; asserts expected exception is non-null.
test/EFCore.Design.Tests/Design/Internal/DatabaseOperationsTest.cs Uses null! for intentionally-null args; makes args array nullable in helper.
test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs Removes redundant file-level nullable directive.
test/EFCore.Design.Tests/Design/DesignTimeServicesTest.cs Makes providerOptions/context/startup code nullable where optional under NRT.
Suppressed comments (1)

test/EFCore.Relational.Tests/TestUtilities/FakeProvider/FakeDbCommand.cs:16

  • FakeDbCommand has a public parameterless constructor, but _commandExecutor is initialized with null!. There are call sites which create new FakeDbCommand(); if any code path executes the command, this will result in a NullReferenceException. Initializing the executor in the default constructor avoids hiding a real nullability problem with null!.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@AndriySvyryd
AndriySvyryd force-pushed the issue24427-nrt-3-relational-design branch from 3fa20b4 to 940cf51 Compare August 12, 2026 21:25
Base automatically changed from issue24427-nrt-2-providers to main August 12, 2026 22:03
- Annotate relational specification and unit test infrastructure
- Preserve migration, model snapshot, and design-time test semantics

Part of #24427
@AndriySvyryd
AndriySvyryd force-pushed the issue24427-nrt-3-relational-design branch from 940cf51 to e3f5708 Compare August 12, 2026 22:03
@AndriySvyryd
AndriySvyryd merged commit f249a6e into main Aug 12, 2026
15 checks passed
@AndriySvyryd
AndriySvyryd deleted the issue24427-nrt-3-relational-design branch August 12, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants