refactor: replace internal UnitOfWork with NotificationUnitOfWork and NotificationBaseRepository
- 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.
This commit is contained in:
@@ -16,10 +16,10 @@ public static class ServiceCollectionExtensions
|
||||
services.AddDbContext<NotificationDbContext>(options =>
|
||||
options.UseNpgsql(connectionString));
|
||||
|
||||
services.AddScoped<IUnitOfWork, UnitOfWork>();
|
||||
services.AddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||
services.AddScoped<IEmailChannelRepository, EmailChannelRepository>();
|
||||
services.AddScoped<IEmailChannelUsageRepository, EmailChannelUsageRepository>();
|
||||
services.AddScoped<IUnitOfWork, NotificationUnitOfWork>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user