using ZB.MOM.WW.CBDD.Core.Collections; using ZB.MOM.WW.CBDD.Core.Metadata; namespace ZB.MOM.WW.CBDD.Shared; /// /// Extended test context that inherits from TestDbContext. /// Used to verify that collection initialization works correctly with inheritance. /// public partial class TestExtendedDbContext : TestDbContext { /// /// Gets or sets the extended entities. /// public DocumentCollection ExtendedEntities { get; set; } = null!; /// /// Initializes a new instance of the class. /// /// Database file path. public TestExtendedDbContext(string databasePath) : base(databasePath) { InitializeCollections(); } /// protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity() .ToCollection("extended_entities") .HasKey(e => e.Id); } }