2024-11-15 16:29:15 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2024-11-22 17:52:15 +05:00
|
|
|
|
using Persistence.Database.Entity;
|
2024-11-15 16:29:15 +05:00
|
|
|
|
using Persistence.Database.Model;
|
2024-11-22 17:52:15 +05:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2024-11-15 16:29:15 +05:00
|
|
|
|
|
|
|
|
|
namespace Persistence.Database;
|
|
|
|
|
public interface IPersistenceDbContext : IDisposable
|
|
|
|
|
{
|
|
|
|
|
DbSet<DataSaub> DataSaub { get; }
|
2024-11-22 17:52:15 +05:00
|
|
|
|
DbSet<TimestampedSet> TimestampedSets { get; }
|
|
|
|
|
DbSet<TEntity> Set<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties | DynamicallyAccessedMemberTypes.Interfaces)] TEntity>() where TEntity : class;
|
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
2024-11-15 16:29:15 +05:00
|
|
|
|
}
|