feat: add repository layer with IUnitOfWork and fixed EF base

- ITransaction, IUnitOfWork in DAL.Abstract
- EfTransactionAdapter, EfUnitOfWork<TDbContext>, NotificationUnitOfWork in DAL.EF
- NotificationEfRepository<TEntity>: async-only base, fixed Exists (AnyAsync),
  fixed batch Add (AddRangeAsync), single SaveChangesAsync per operation
- TemplateRepository, ProviderRepository, ProviderUsageRepository
- ProviderUsageRepository.IncrementAsync uses atomic PostgreSQL upsert
- ProviderRepository deserializes settings polymorphically via ProviderType discriminator

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Anatolii Grynchuk
2026-05-01 23:18:41 +03:00
parent 26b29d169e
commit 4f573da374
9 changed files with 381 additions and 0 deletions
@@ -0,0 +1,8 @@
namespace HrynCo.NotificationService.DAL.EF.Core;
internal sealed class NotificationUnitOfWork : EfUnitOfWork<NotificationDbContext>
{
public NotificationUnitOfWork(NotificationDbContext context) : base(context)
{
}
}