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
{
public DocumentCollection ExtendedEntities { get; set; } = null!;
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);
}
}