diff --git a/test/EFCore.OData.FunctionalTests/Query/GearsOfWarODataContext.cs b/test/EFCore.OData.FunctionalTests/Query/GearsOfWarODataContext.cs index a187fd36638..34742e9fff0 100644 --- a/test/EFCore.OData.FunctionalTests/Query/GearsOfWarODataContext.cs +++ b/test/EFCore.OData.FunctionalTests/Query/GearsOfWarODataContext.cs @@ -92,6 +92,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity().Property(l => l.Id).ValueGeneratedNever(); modelBuilder.Entity().Property(g => g.Location).HasColumnType("varchar(100)"); + + // No support yet for DateOnly/TimeOnly (#24507) + modelBuilder.Entity( + b => + { + b.Ignore(m => m.Date); + b.Ignore(m => m.Time); + }); } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerFixture.cs index a66cd5abbde..537a3ceb53b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerFixture.cs @@ -18,12 +18,20 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con modelBuilder.Entity().Property(g => g.Location).HasColumnType("varchar(100)"); // Full-text binary search - modelBuilder.Entity() - .Property("BriefingDocument"); + modelBuilder.Entity( + b => + { + b.Property("BriefingDocument"); + b.Property("BriefingDocumentFileExtension").HasColumnType("nvarchar(16)"); + }); - modelBuilder.Entity() - .Property("BriefingDocumentFileExtension") - .HasColumnType("nvarchar(16)"); + // No support yet for DateOnly/TimeOnly (#24507) + modelBuilder.Entity( + b => + { + b.Ignore(m => m.Date); + b.Ignore(m => m.Time); + }); } protected override void Seed(GearsOfWarContext context) diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerFixture.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerFixture.cs index 9791db25aca..03039c5c131 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerFixture.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerFixture.cs @@ -16,6 +16,14 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con base.OnModelCreating(modelBuilder, context); modelBuilder.Entity().Property(g => g.Location).HasColumnType("varchar(100)"); + + // No support yet for DateOnly/TimeOnly (#24507) + modelBuilder.Entity( + b => + { + b.Ignore(m => m.Date); + b.Ignore(m => m.Time); + }); } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs index a1081c42240..2faed06c11c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs @@ -8912,6 +8912,91 @@ ELSE NULL END, [t].[Note]"); } + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_Year(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_Month(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_Day(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_DayOfYear(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_DayOfWeek(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_AddYears(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_AddMonths(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_DateOnly_AddDays(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_Hour(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_Minute(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_Second(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_Millisecond(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_AddHours(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_AddMinutes(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_Add_TimeSpan(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_IsBetween(bool async) + => Task.CompletedTask; + + [ConditionalTheory] // #24507 + [MemberData(nameof(IsAsyncData))] + public override Task Where_TimeOnly_subtract_TimeOnly(bool async) + => Task.CompletedTask; + private void AssertSql(params string[] expected) => Fixture.TestSqlLoggerFactory.AssertBaseline(expected); }