persistence/Persistence.Database/IPersistenceDbContext.cs

14 lines
830 B
C#
Raw Permalink Normal View History

using Microsoft.EntityFrameworkCore;
2024-11-22 17:52:15 +05:00
using Persistence.Database.Entity;
using Persistence.Database.Model;
2024-11-22 17:52:15 +05:00
using System.Diagnostics.CodeAnalysis;
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);
}