50828d23ec
- Consolidate unit of work implementation with NotificationUnitOfWork. - Refactor repositories to use NotificationBaseRepository for consistency. - Simplify request handlers by removing IUnitOfWork dependency. - Update related tests and service registration.
20 lines
627 B
C#
20 lines
627 B
C#
namespace HrynCo.NotificationService.DAL.EF.Core;
|
|
|
|
using HrynCo.DAL.Abstract.Entities;
|
|
using HrynCo.DAL.EF.Core;
|
|
|
|
public abstract class NotificationBaseRepository<TEntity>
|
|
: BaseRepository<NotificationEfRepository<TEntity>, NotificationDbContext, TEntity, Guid> where TEntity : Entity
|
|
{
|
|
protected NotificationBaseRepository(NotificationDbContext dbContext)
|
|
{
|
|
DbContext = dbContext;
|
|
}
|
|
|
|
private NotificationDbContext DbContext { get; set; }
|
|
|
|
protected override NotificationEfRepository<TEntity> CreateEfRepository()
|
|
{
|
|
return new NotificationEfRepository<TEntity>(DbContext);
|
|
}
|
|
} |