This commit is contained in:
2025-10-27 17:39:18 -04:00
commit 31f723bea4
1579 changed files with 642409 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
namespace Prefab.Catalog.Data;
/// <summary>
/// Provides factory methods that create catalog module database contexts on demand.
/// </summary>
public interface ICatalogDbContextFactory
{
/// <summary>
/// Creates a new writable catalog database context instance for the current operation.
/// </summary>
/// <param name="cancellationToken">Token used to cancel context creation.</param>
/// <returns>An <see cref="IModuleDb"/> instance that must be disposed by the caller.</returns>
ValueTask<IModuleDb> CreateWritableAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Creates a new read-only catalog database context instance for the current operation.
/// </summary>
/// <param name="cancellationToken">Token used to cancel context creation.</param>
/// <returns>An <see cref="IModuleDbReadOnly"/> instance that must be disposed by the caller.</returns>
ValueTask<IModuleDbReadOnly> CreateReadOnlyAsync(CancellationToken cancellationToken = default);
}