refactor: modularize email processing logic and improve service structure

- Extract email template handling, rendering, and sending code into `Worker.Services` project.
- Introduce `EmailTemplateService`, `EmailTemplateRenderingService`, and `SendEmailService`.
- Simplify consumer logic by delegating to scoped services.
- Update project dependencies and package references accordingly.
This commit is contained in:
Anatolii Grynchuk
2026-05-14 22:15:15 +03:00
parent 0861e18cec
commit 25fb48ccf0
18 changed files with 394 additions and 174 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ COPY ["Directory.Build.props", "."]
COPY ["Directory.Packages.props", "."]
COPY ["HrynCo.NotificationService.DAL.Abstract/HrynCo.NotificationService.DAL.Abstract.csproj", "HrynCo.NotificationService.DAL.Abstract/"]
COPY ["HrynCo.NotificationService.DAL.EF/HrynCo.NotificationService.DAL.EF.csproj", "HrynCo.NotificationService.DAL.EF/"]
COPY ["HrynCo.NotificationService.Services/HrynCo.NotificationService.Services.csproj", "HrynCo.NotificationService.Services/"]
COPY ["HrynCo.NotificationService.Worker.Services/HrynCo.NotificationService.Worker.Services.csproj", "HrynCo.NotificationService.Worker.Services/"]
COPY ["HrynCo.NotificationService.Worker/HrynCo.NotificationService.Worker.csproj", "HrynCo.NotificationService.Worker/"]
RUN dotnet restore "HrynCo.NotificationService.Worker/HrynCo.NotificationService.Worker.csproj"
@@ -28,4 +28,4 @@ RUN dotnet publish "./HrynCo.NotificationService.Worker.csproj" -c $BUILD_CONFIG
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "HrynCo.NotificationService.Worker.dll"]
ENTRYPOINT ["dotnet", "HrynCo.NotificationService.Worker.dll"]