// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using EntityFrameworkCore.Jet.FunctionalTests.TestUtilities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.TestUtilities; namespace EntityFrameworkCore.Jet.FunctionalTests { public class MonsterFixupChangedChangingJetTest : MonsterFixupTestBase { public MonsterFixupChangedChangingJetTest(MonsterFixupChangedChangingJetFixture fixture) : base(fixture) { } public class MonsterFixupChangedChangingJetFixture : MonsterFixupChangedChangingFixtureBase { protected override ITestStoreFactory TestStoreFactory => JetTestStoreFactory.Instance; protected override void OnModelCreating( ModelBuilder builder) { base.OnModelCreating(builder); builder.Entity().Property(e => e.MessageId).UseJetIdentityColumn(); builder.Entity() .OwnsOne( c => (TDimensions)c.Dimensions, db => { db.Property(d => d.Depth).HasColumnType("decimal(18,2)"); db.Property(d => d.Width).HasColumnType("decimal(18,2)"); db.Property(d => d.Height).HasColumnType("decimal(18,2)"); }); builder.Entity().Property(e => e.PhotoId).UseJetIdentityColumn(); builder.Entity().Property(e => e.ReviewId).UseJetIdentityColumn(); builder.Entity() .OwnsOne( c => (TDimensions)c.Dimensions, db => { db.Property(d => d.Depth).HasColumnType("decimal(18,2)"); db.Property(d => d.Width).HasColumnType("decimal(18,2)"); db.Property(d => d.Height).HasColumnType("decimal(18,2)"); }); } } } }