This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-22133-bak in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 77f7e559c366cf8a8ef4ebe57973d89668c336e1 Author: Pavel Tupitsyn <[email protected]> AuthorDate: Fri Jul 11 17:16:25 2025 +0300 wip NorthwindQueryIgniteFixture --- .../Query/NorthwindQueryIgniteFixture.cs | 10 +++++ .../TestModels/Northwind/NorthwindIgniteContext.cs | 48 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/Query/NorthwindQueryIgniteFixture.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/Query/NorthwindQueryIgniteFixture.cs index 79f8a39b76d..c79b03f24e4 100644 --- a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/Query/NorthwindQueryIgniteFixture.cs +++ b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/Query/NorthwindQueryIgniteFixture.cs @@ -15,9 +15,11 @@ namespace Apache.Ignite.EntityFrameworkCore.FunctionalTests.Query; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.TestUtilities; +using TestModels.Northwind; using TestUtilities; public class NorthwindQueryIgniteFixture<TModelCustomizer> : NorthwindQueryRelationalFixture<TModelCustomizer> @@ -25,4 +27,12 @@ public class NorthwindQueryIgniteFixture<TModelCustomizer> : NorthwindQueryRelat { protected override ITestStoreFactory TestStoreFactory => IgniteNorthwindTestStoreFactory.Instance; + + protected override Type ContextType + => typeof(NorthwindIgniteContext); + + protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) + { + base.OnModelCreating(modelBuilder, context); + } } diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs new file mode 100644 index 00000000000..6576dfefd9c --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestModels/Northwind/NorthwindIgniteContext.cs @@ -0,0 +1,48 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Apache.Ignite.EntityFrameworkCore.FunctionalTests.TestModels.Northwind; + +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.TestModels.Northwind; + +public class NorthwindIgniteContext : NorthwindRelationalContext +{ + public NorthwindIgniteContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Entity<CustomerQuery>(); + + modelBuilder.Entity<Customer>( + b => + { + b.Property(e => e.CustomerID).IsFixedLength(); + }); + + modelBuilder.Entity<Order>( + b => + { + b.Property(e => e.CustomerID).IsFixedLength(); + b.Property(e => e.EmployeeID).HasColumnType("int"); + b.Property(o => o.OrderDate).HasColumnType("datetime"); + }); + } +}
