moved service to separate project (Kontur developer said "WTF WHY ARE U STORING SERVICES IN INFRASTRUCTURE SLAVA D")

This commit is contained in:
Вячеслав 2025-04-18 14:12:00 +05:00
parent 147fb683f7
commit 41ff1555f8
11 changed files with 33 additions and 9 deletions

View file

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SurveyBackend.DTOs; using SurveyBackend.DTOs;
using SurveyBackend.Infrastructure.Services;
using SurveyBackend.Mappers.UserDTOs; using SurveyBackend.Mappers.UserDTOs;
using SurveyBackend.Services.Services;
namespace SurveyBackend.Controllers; namespace SurveyBackend.Controllers;

View file

@ -1,7 +1,6 @@
using SurveyBackend.Core.Models; using SurveyBackend.Core.Models;
using SurveyBackend.Core.Services; using SurveyBackend.Core.Services;
using SurveyBackend.DTOs; using SurveyBackend.DTOs;
using SurveyBackend.Infrastructure.Services;
namespace SurveyBackend.Mappers.UserDTOs; namespace SurveyBackend.Mappers.UserDTOs;

View file

@ -7,7 +7,8 @@ using SurveyBackend.Core.Services;
using SurveyBackend.Infrastructure; using SurveyBackend.Infrastructure;
using SurveyBackend.Infrastructure.Data; using SurveyBackend.Infrastructure.Data;
using SurveyBackend.Infrastructure.Repositories; using SurveyBackend.Infrastructure.Repositories;
using SurveyBackend.Infrastructure.Services; using SurveyBackend.Services;
using SurveyBackend.Services.Services;
using SurveyLib.Core.Repositories; using SurveyLib.Core.Repositories;
using SurveyLib.Core.Services; using SurveyLib.Core.Services;
using SurveyLib.Infrastructure.EFCore.Data; using SurveyLib.Infrastructure.EFCore.Data;

View file

@ -17,6 +17,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SurveyBackend.Core\SurveyBackend.Core.csproj" /> <ProjectReference Include="..\SurveyBackend.Core\SurveyBackend.Core.csproj" />
<ProjectReference Include="..\SurveyBackend.Infrastructure\SurveyBackend.Infrastructure.csproj" /> <ProjectReference Include="..\SurveyBackend.Infrastructure\SurveyBackend.Infrastructure.csproj" />
<ProjectReference Include="..\SurveyBackend.Services\SurveyBackend.Services.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -2,7 +2,7 @@ using System.Text;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
namespace SurveyBackend.Infrastructure; namespace SurveyBackend.Services;
public static class AuthOptions public static class AuthOptions
{ {

View file

@ -3,7 +3,7 @@ using System.Security.Claims;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using SurveyBackend.Core.Models; using SurveyBackend.Core.Models;
namespace SurveyBackend.Infrastructure.Helpers; namespace SurveyBackend.Services.Helpers;
public class TokenHelper public class TokenHelper
{ {

View file

@ -1,8 +1,8 @@
using SurveyBackend.Core.Models; using SurveyBackend.Core.Models;
using SurveyBackend.Core.Services; using SurveyBackend.Core.Services;
using SurveyBackend.Infrastructure.Helpers; using SurveyBackend.Services.Helpers;
namespace SurveyBackend.Infrastructure.Services; namespace SurveyBackend.Services.Services;
public class AuthorizationService public class AuthorizationService
{ {

View file

@ -1,7 +1,7 @@
using System.Security.Cryptography; using System.Security.Cryptography;
using SurveyBackend.Core.Services; using SurveyBackend.Core.Services;
namespace SurveyBackend.Infrastructure.Services; namespace SurveyBackend.Services.Services;
public class Sha256PasswordHasher : IPasswordHasher public class Sha256PasswordHasher : IPasswordHasher
{ {

View file

@ -2,7 +2,7 @@ using SurveyBackend.Core.Models;
using SurveyBackend.Core.Repositories; using SurveyBackend.Core.Repositories;
using SurveyBackend.Core.Services; using SurveyBackend.Core.Services;
namespace SurveyBackend.Infrastructure.Services; namespace SurveyBackend.Services.Services;
public class UserService : IUserService public class UserService : IUserService
{ {

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\SurveyBackend.Core\SurveyBackend.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
</ItemGroup>
</Project>

View file

@ -10,6 +10,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyLib.Infrastructure.EF
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyLib.Core", "..\SurveyLib\SurveyLib.Core\SurveyLib.Core.csproj", "{C17C405B-37CF-48E6-AA44-44B878F4DE56}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyLib.Core", "..\SurveyLib\SurveyLib.Core\SurveyLib.Core.csproj", "{C17C405B-37CF-48E6-AA44-44B878F4DE56}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyBackend.Services", "SurveyBackend.Services\SurveyBackend.Services.csproj", "{3CDA6495-4FB2-4F07-8B2F-15BFD2A35181}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -36,5 +38,9 @@ Global
{C17C405B-37CF-48E6-AA44-44B878F4DE56}.Debug|Any CPU.Build.0 = Debug|Any CPU {C17C405B-37CF-48E6-AA44-44B878F4DE56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C17C405B-37CF-48E6-AA44-44B878F4DE56}.Release|Any CPU.ActiveCfg = Release|Any CPU {C17C405B-37CF-48E6-AA44-44B878F4DE56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C17C405B-37CF-48E6-AA44-44B878F4DE56}.Release|Any CPU.Build.0 = Release|Any CPU {C17C405B-37CF-48E6-AA44-44B878F4DE56}.Release|Any CPU.Build.0 = Release|Any CPU
{3CDA6495-4FB2-4F07-8B2F-15BFD2A35181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CDA6495-4FB2-4F07-8B2F-15BFD2A35181}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CDA6495-4FB2-4F07-8B2F-15BFD2A35181}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CDA6495-4FB2-4F07-8B2F-15BFD2A35181}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal