diff --git a/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs index a36bf7e8667..b294bd8df71 100644 --- a/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs @@ -423,14 +423,14 @@ await AssertQuery( [MemberData(nameof(IsAsyncData))] public virtual async Task Parameter_collection_of_strings_Contains_nullable_string(bool async) { - var strings = new[] { "10", "999" }; + string?[] strings = ["10", "999"]; await AssertQuery( async, - ss => ss.Set().Where(c => strings.Any(s => s == c.NullableString))); + ss => ss.Set().Where(c => strings.Contains(c.NullableString))); await AssertQuery( async, - ss => ss.Set().Where(c => !strings.Any(s => s == c.NullableString))); + ss => ss.Set().Where(c => !strings.Contains(c.NullableString))); } [ConditionalTheory] @@ -574,7 +574,7 @@ public virtual Task Column_collection_of_nullable_ints_Contains_null(bool async) public virtual Task Column_collection_of_strings_contains_null(bool async) => AssertQuery( async, - ss => ss.Set().Where(c => c.Strings.Any(s => s == null)), + ss => ss.Set().Where(c => ((string?[])c.Strings).Contains(null)), assertEmpty: true); [ConditionalTheory]