refactor: restructure solution to match ItemTracker layered architecture

- Remove Core (replaced by dedicated layers)
- Add DAL.Abstract (domain model + repository interfaces)
- Add DAL.EF (EF context, entities, migrations — references DAL.Abstract)
- Add Services (business logic — references DAL.Abstract only, not DAL.EF)
- Api and Worker reference Services + DAL.EF for DI wiring
- Replace Core.Tests with Services.Tests
- Dependency boundary enforced: Services never references DAL.EF

Ref: IT-628

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Anatolii Grynchuk
2026-05-01 19:17:26 +03:00
parent 8aee35c123
commit ed4a6578c3
12 changed files with 55 additions and 12 deletions
@@ -11,7 +11,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HrynCo.NotificationService.Core\HrynCo.NotificationService.Core.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.Services\HrynCo.NotificationService.Services.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.DAL.EF\HrynCo.NotificationService.DAL.EF.csproj" />
</ItemGroup>
</Project>
@@ -1,6 +0,0 @@
namespace HrynCo.NotificationService.Core;
public class Class1
{
}
@@ -0,0 +1,6 @@
namespace HrynCo.NotificationService.DAL.Abstract;
public class Class1
{
}
@@ -0,0 +1,6 @@
namespace HrynCo.NotificationService.DAL.EF;
public class Class1
{
}
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\HrynCo.NotificationService.DAL.Abstract\HrynCo.NotificationService.DAL.Abstract.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
@@ -19,7 +19,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HrynCo.NotificationService.Core\HrynCo.NotificationService.Core.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.Services\HrynCo.NotificationService.Services.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.DAL.Abstract\HrynCo.NotificationService.DAL.Abstract.csproj" />
</ItemGroup>
</Project>
@@ -1,4 +1,4 @@
namespace HrynCo.NotificationService.Core.Tests;
namespace HrynCo.NotificationService.Services.Tests;
public class UnitTest1
{
@@ -0,0 +1,6 @@
namespace HrynCo.NotificationService.Services;
public class Class1
{
}
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\HrynCo.NotificationService.DAL.Abstract\HrynCo.NotificationService.DAL.Abstract.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
@@ -12,6 +12,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HrynCo.NotificationService.Core\HrynCo.NotificationService.Core.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.Services\HrynCo.NotificationService.Services.csproj" />
<ProjectReference Include="..\HrynCo.NotificationService.DAL.EF\HrynCo.NotificationService.DAL.EF.csproj" />
</ItemGroup>
</Project>
+4 -2
View File
@@ -1,7 +1,9 @@
<Solution>
<Project Path="HrynCo.NotificationService.Api.IntegrationTests/HrynCo.NotificationService.Api.IntegrationTests.csproj" />
<Project Path="HrynCo.NotificationService.Api/HrynCo.NotificationService.Api.csproj" />
<Project Path="HrynCo.NotificationService.Core.Tests/HrynCo.NotificationService.Core.Tests.csproj" />
<Project Path="HrynCo.NotificationService.Core/HrynCo.NotificationService.Core.csproj" />
<Project Path="HrynCo.NotificationService.DAL.Abstract/HrynCo.NotificationService.DAL.Abstract.csproj" />
<Project Path="HrynCo.NotificationService.DAL.EF/HrynCo.NotificationService.DAL.EF.csproj" />
<Project Path="HrynCo.NotificationService.Services.Tests/HrynCo.NotificationService.Services.Tests.csproj" />
<Project Path="HrynCo.NotificationService.Services/HrynCo.NotificationService.Services.csproj" />
<Project Path="HrynCo.NotificationService.Worker/HrynCo.NotificationService.Worker.csproj" />
</Solution>