Implement checkpoint modes with docs/tests and reorganize project file layout
All checks were successful
NuGet Publish / build-and-pack (push) Successful in 46s
NuGet Publish / publish-to-gitea (push) Successful in 53s

This commit is contained in:
Joseph Doherty
2026-02-21 07:56:36 -05:00
parent 3ffd468c79
commit 4c6aaa5a3f
96 changed files with 744 additions and 249 deletions

View File

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