using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Prefab.Data.Entities;
namespace Prefab.Data;
///
/// Abstraction over the Prefab relational database context.
///
public interface IPrefabDb : IDisposable, IAsyncDisposable
{
///
/// Gets the EF Core database facade for executing commands and migrations.
///
DatabaseFacade Database { get; }
///
/// Persists pending changes to the database.
///
int SaveChanges();
///
/// Persists pending changes to the database asynchronously.
///
/// Token used to cancel the operation.
Task SaveChangesAsync(CancellationToken cancellationToken);
///
/// Gets the audit log set.
///
DbSet AuditLogs { get; }
///
/// Gets the audit log item set.
///
DbSet AuditLogItems { get; }
///
/// Gets the generic attribute set.
///
DbSet GenericAttributes { get; }
///
/// Gets the seeder audit set.
///
DbSet SeederLogs { get; }
}