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

49
Prefab/Data/IPrefabDb.cs Normal file
View File

@@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Prefab.Data.Entities;
namespace Prefab.Data;
/// <summary>
/// Abstraction over the Prefab relational database context.
/// </summary>
public interface IPrefabDb : IDisposable, IAsyncDisposable
{
/// <summary>
/// Gets the EF Core database facade for executing commands and migrations.
/// </summary>
DatabaseFacade Database { get; }
/// <summary>
/// Persists pending changes to the database.
/// </summary>
int SaveChanges();
/// <summary>
/// Persists pending changes to the database asynchronously.
/// </summary>
/// <param name="cancellationToken">Token used to cancel the operation.</param>
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
/// <summary>
/// Gets the audit log set.
/// </summary>
DbSet<AuditLog> AuditLogs { get; }
/// <summary>
/// Gets the audit log item set.
/// </summary>
DbSet<AuditLogItem> AuditLogItems { get; }
/// <summary>
/// Gets the generic attribute set.
/// </summary>
DbSet<GenericAttribute> GenericAttributes { get; }
/// <summary>
/// Gets the seeder audit set.
/// </summary>
DbSet<SeederLog> SeederLogs { get; }
}