From cd72710d24df520ffb1f583a616f3e30474da393 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Mon, 21 Jun 2021 17:46:44 +0300 Subject: [PATCH] Refactor project structure to clean architecture model. --- .../DataAnnotations/DatetimeNotInThePast.cs | 2 +- .../Entities}/Feedback.cs | 2 +- .../Entities}/FeedbackReceiver.cs | 2 +- .../Models => Retroactiune.Core/Entities}/Token.cs | 4 ++-- .../Interfaces}/IDatabaseSettings.cs | 2 +- .../Interfaces}/IFeedbackReceiverService.cs | 4 ++-- .../Interfaces}/ITokensService.cs | 2 +- Retroactiune.Core/Retroactiune.Core.csproj | 11 +++++++++++ .../Services/FeedbackReceiverService.cs | 6 +++--- .../Services/GenericServiceException.cs | 2 +- .../Services/TokensService.cs | 6 +++--- .../DatabaseSettings.cs | 4 +++- .../Retroactiune.Infrastructure.csproj | 11 +++++++++++ .../Controllers/TestFeedbackReceiver.cs | 4 ++-- .../Retroactiune.WebAPI/Controllers/TestTokens.cs | 4 ++-- .../Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs | 5 +++-- .../DataAnnotations/TestDatetimeNotInThePast.cs | 4 ++-- .../Services/TestFeedbackReceiverService.cs | 8 ++++---- .../Services/TestTokensService.cs | 8 ++++---- Retroactiune.UnitTests/Retroactiune.UnitTests.csproj | 5 +++++ .../Controllers/TestFeedbackReceiverController.cs | 4 ++-- .../Controllers/TestTokensController.cs | 5 +++-- .../Controllers/FeedbackReceiversController.cs | 5 +++-- Retroactiune.WebAPI/Controllers/TokensController.cs | 8 ++++++-- .../DataTransferObjects/FeedbackReceiverInDto.cs | 2 +- .../DataTransferObjects/FeedbackReceiverOutDto.cs | 2 +- .../DataTransferObjects/GenerateTokensDto.cs | 2 +- Retroactiune.WebAPI/MappingProfile.cs | 2 +- Retroactiune.WebAPI/Retroactiune.WebAPI.csproj | 5 +++++ Retroactiune.WebAPI/Startup.cs | 5 +++-- Retroactiune.WebAPI/TestingStartup.cs | 5 +++-- Retroactiune.sln | 12 ++++++++++++ 32 files changed, 104 insertions(+), 49 deletions(-) rename {Retroactiune.WebAPI => Retroactiune.Core}/DataAnnotations/DatetimeNotInThePast.cs (93%) rename {Retroactiune.WebAPI/Models => Retroactiune.Core/Entities}/Feedback.cs (68%) rename {Retroactiune.WebAPI/Models => Retroactiune.Core/Entities}/FeedbackReceiver.cs (96%) rename {Retroactiune.WebAPI/Models => Retroactiune.Core/Entities}/Token.cs (90%) rename {Retroactiune.WebAPI/Database => Retroactiune.Core/Interfaces}/IDatabaseSettings.cs (91%) rename {Retroactiune.WebAPI/Services => Retroactiune.Core/Interfaces}/IFeedbackReceiverService.cs (94%) rename {Retroactiune.WebAPI/Services => Retroactiune.Core/Interfaces}/ITokensService.cs (96%) create mode 100644 Retroactiune.Core/Retroactiune.Core.csproj rename {Retroactiune.WebAPI => Retroactiune.Core}/Services/FeedbackReceiverService.cs (96%) rename {Retroactiune.WebAPI => Retroactiune.Core}/Services/GenericServiceException.cs (82%) rename {Retroactiune.WebAPI => Retroactiune.Core}/Services/TokensService.cs (94%) rename {Retroactiune.WebAPI/Database => Retroactiune.Infrastructure}/DatabaseSettings.cs (87%) create mode 100644 Retroactiune.Infrastructure/Retroactiune.Infrastructure.csproj rename Retroactiune.UnitTests/{Retroactiune.WebAPI => Retroactiune.Core}/DataAnnotations/TestDatetimeNotInThePast.cs (88%) rename Retroactiune.UnitTests/{Retroactiune.WebAPI => Retroactiune.Core}/Services/TestFeedbackReceiverService.cs (98%) rename Retroactiune.UnitTests/{Retroactiune.WebAPI => Retroactiune.Core}/Services/TestTokensService.cs (96%) diff --git a/Retroactiune.WebAPI/DataAnnotations/DatetimeNotInThePast.cs b/Retroactiune.Core/DataAnnotations/DatetimeNotInThePast.cs similarity index 93% rename from Retroactiune.WebAPI/DataAnnotations/DatetimeNotInThePast.cs rename to Retroactiune.Core/DataAnnotations/DatetimeNotInThePast.cs index 4a3e59b..953ad88 100644 --- a/Retroactiune.WebAPI/DataAnnotations/DatetimeNotInThePast.cs +++ b/Retroactiune.Core/DataAnnotations/DatetimeNotInThePast.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; -namespace Retroactiune.DataAnnotations +namespace Retroactiune.Core.DataAnnotations { public class DatetimeNotInThePast : ValidationAttribute { diff --git a/Retroactiune.WebAPI/Models/Feedback.cs b/Retroactiune.Core/Entities/Feedback.cs similarity index 68% rename from Retroactiune.WebAPI/Models/Feedback.cs rename to Retroactiune.Core/Entities/Feedback.cs index 3132b92..9faaa88 100644 --- a/Retroactiune.WebAPI/Models/Feedback.cs +++ b/Retroactiune.Core/Entities/Feedback.cs @@ -1,4 +1,4 @@ -namespace Retroactiune.Models +namespace Retroactiune.Core.Entities { public class Feedback { diff --git a/Retroactiune.WebAPI/Models/FeedbackReceiver.cs b/Retroactiune.Core/Entities/FeedbackReceiver.cs similarity index 96% rename from Retroactiune.WebAPI/Models/FeedbackReceiver.cs rename to Retroactiune.Core/Entities/FeedbackReceiver.cs index 4c5738d..5c98beb 100644 --- a/Retroactiune.WebAPI/Models/FeedbackReceiver.cs +++ b/Retroactiune.Core/Entities/FeedbackReceiver.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; -namespace Retroactiune.Models +namespace Retroactiune.Core.Entities { /// /// FeedbackReceiver is the entity that receives feedback from the users. diff --git a/Retroactiune.WebAPI/Models/Token.cs b/Retroactiune.Core/Entities/Token.cs similarity index 90% rename from Retroactiune.WebAPI/Models/Token.cs rename to Retroactiune.Core/Entities/Token.cs index db929ab..1058ded 100644 --- a/Retroactiune.WebAPI/Models/Token.cs +++ b/Retroactiune.Core/Entities/Token.cs @@ -3,11 +3,11 @@ using System.Text.Json.Serialization; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; -namespace Retroactiune.Models +namespace Retroactiune.Core.Entities { /// /// Token represents a token. - /// Token is used to authorize a for the . + /// Token is used to authorize a for the . /// public class Token { diff --git a/Retroactiune.WebAPI/Database/IDatabaseSettings.cs b/Retroactiune.Core/Interfaces/IDatabaseSettings.cs similarity index 91% rename from Retroactiune.WebAPI/Database/IDatabaseSettings.cs rename to Retroactiune.Core/Interfaces/IDatabaseSettings.cs index c84174a..152708c 100644 --- a/Retroactiune.WebAPI/Database/IDatabaseSettings.cs +++ b/Retroactiune.Core/Interfaces/IDatabaseSettings.cs @@ -1,4 +1,4 @@ -namespace Retroactiune.Database +namespace Retroactiune.Core.Interfaces { /// /// Interface for repressing the application's database settings. diff --git a/Retroactiune.WebAPI/Services/IFeedbackReceiverService.cs b/Retroactiune.Core/Interfaces/IFeedbackReceiverService.cs similarity index 94% rename from Retroactiune.WebAPI/Services/IFeedbackReceiverService.cs rename to Retroactiune.Core/Interfaces/IFeedbackReceiverService.cs index b8c27ab..aca7785 100644 --- a/Retroactiune.WebAPI/Services/IFeedbackReceiverService.cs +++ b/Retroactiune.Core/Interfaces/IFeedbackReceiverService.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Retroactiune.Models; +using Retroactiune.Core.Entities; -namespace Retroactiune.Services +namespace Retroactiune.Core.Interfaces { public interface IFeedbackReceiverService { diff --git a/Retroactiune.WebAPI/Services/ITokensService.cs b/Retroactiune.Core/Interfaces/ITokensService.cs similarity index 96% rename from Retroactiune.WebAPI/Services/ITokensService.cs rename to Retroactiune.Core/Interfaces/ITokensService.cs index 7163444..b6cba63 100644 --- a/Retroactiune.WebAPI/Services/ITokensService.cs +++ b/Retroactiune.Core/Interfaces/ITokensService.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; -namespace Retroactiune.Services +namespace Retroactiune.Core.Interfaces { public interface ITokensService { diff --git a/Retroactiune.Core/Retroactiune.Core.csproj b/Retroactiune.Core/Retroactiune.Core.csproj new file mode 100644 index 0000000..02f0260 --- /dev/null +++ b/Retroactiune.Core/Retroactiune.Core.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.1 + + + + + + + diff --git a/Retroactiune.WebAPI/Services/FeedbackReceiverService.cs b/Retroactiune.Core/Services/FeedbackReceiverService.cs similarity index 96% rename from Retroactiune.WebAPI/Services/FeedbackReceiverService.cs rename to Retroactiune.Core/Services/FeedbackReceiverService.cs index a4a6337..decf370 100644 --- a/Retroactiune.WebAPI/Services/FeedbackReceiverService.cs +++ b/Retroactiune.Core/Services/FeedbackReceiverService.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MongoDB.Driver; -using Retroactiune.Database; -using Retroactiune.Models; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; -namespace Retroactiune.Services +namespace Retroactiune.Core.Services { /// /// Service that simplifies access to the database for managing FeedbackReceiver items. diff --git a/Retroactiune.WebAPI/Services/GenericServiceException.cs b/Retroactiune.Core/Services/GenericServiceException.cs similarity index 82% rename from Retroactiune.WebAPI/Services/GenericServiceException.cs rename to Retroactiune.Core/Services/GenericServiceException.cs index 06e9cf3..551f445 100644 --- a/Retroactiune.WebAPI/Services/GenericServiceException.cs +++ b/Retroactiune.Core/Services/GenericServiceException.cs @@ -1,6 +1,6 @@ using System; -namespace Retroactiune.Services +namespace Retroactiune.Core.Services { public class GenericServiceException : Exception { diff --git a/Retroactiune.WebAPI/Services/TokensService.cs b/Retroactiune.Core/Services/TokensService.cs similarity index 94% rename from Retroactiune.WebAPI/Services/TokensService.cs rename to Retroactiune.Core/Services/TokensService.cs index 36fa88a..8f4a9db 100644 --- a/Retroactiune.WebAPI/Services/TokensService.cs +++ b/Retroactiune.Core/Services/TokensService.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Threading.Tasks; using MongoDB.Driver; -using Retroactiune.Database; -using Retroactiune.Models; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; -namespace Retroactiune.Services +namespace Retroactiune.Core.Services { public class TokensService : ITokensService { diff --git a/Retroactiune.WebAPI/Database/DatabaseSettings.cs b/Retroactiune.Infrastructure/DatabaseSettings.cs similarity index 87% rename from Retroactiune.WebAPI/Database/DatabaseSettings.cs rename to Retroactiune.Infrastructure/DatabaseSettings.cs index c8e79cd..76fcdf1 100644 --- a/Retroactiune.WebAPI/Database/DatabaseSettings.cs +++ b/Retroactiune.Infrastructure/DatabaseSettings.cs @@ -1,4 +1,6 @@ -namespace Retroactiune.Database +using Retroactiune.Core.Interfaces; + +namespace Retroactiune.Infrastructure { /// /// DatabaseSettingsOptions acts as a model for the database settings, it is used in conjunction with the built in diff --git a/Retroactiune.Infrastructure/Retroactiune.Infrastructure.csproj b/Retroactiune.Infrastructure/Retroactiune.Infrastructure.csproj new file mode 100644 index 0000000..5696203 --- /dev/null +++ b/Retroactiune.Infrastructure/Retroactiune.Infrastructure.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.1 + + + + + + + diff --git a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiver.cs b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiver.cs index d6cfda8..4f22ac9 100644 --- a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiver.cs +++ b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiver.cs @@ -14,10 +14,10 @@ using Microsoft.Extensions.Options; using MongoDB.Bson; using MongoDB.Driver; using Newtonsoft.Json; -using Retroactiune.Database; +using Retroactiune.Core.Entities; using Retroactiune.DataTransferObjects; +using Retroactiune.Infrastructure; using Retroactiune.IntegrationTests.Retroactiune.WebAPI.Fixtures; -using Retroactiune.Models; using Xunit; using JsonSerializer = System.Text.Json.JsonSerializer; diff --git a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestTokens.cs b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestTokens.cs index dae2f5a..e62ff70 100644 --- a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestTokens.cs +++ b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Controllers/TestTokens.cs @@ -12,9 +12,9 @@ using Microsoft.Extensions.Options; using MongoDB.Bson; using MongoDB.Driver; using Newtonsoft.Json; -using Retroactiune.Database; +using Retroactiune.Core.Entities; +using Retroactiune.Infrastructure; using Retroactiune.IntegrationTests.Retroactiune.WebAPI.Fixtures; -using Retroactiune.Models; using Xunit; namespace Retroactiune.IntegrationTests.Retroactiune.WebAPI.Controllers diff --git a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs index 00436d6..e6db0bd 100644 --- a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs +++ b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Extensions.Options; using MongoDB.Driver; -using Retroactiune.Database; -using Retroactiune.Models; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; +using Retroactiune.Infrastructure; namespace Retroactiune.IntegrationTests.Retroactiune.WebAPI.Fixtures { diff --git a/Retroactiune.UnitTests/Retroactiune.WebAPI/DataAnnotations/TestDatetimeNotInThePast.cs b/Retroactiune.UnitTests/Retroactiune.Core/DataAnnotations/TestDatetimeNotInThePast.cs similarity index 88% rename from Retroactiune.UnitTests/Retroactiune.WebAPI/DataAnnotations/TestDatetimeNotInThePast.cs rename to Retroactiune.UnitTests/Retroactiune.Core/DataAnnotations/TestDatetimeNotInThePast.cs index 18beedf..4f1c6cf 100644 --- a/Retroactiune.UnitTests/Retroactiune.WebAPI/DataAnnotations/TestDatetimeNotInThePast.cs +++ b/Retroactiune.UnitTests/Retroactiune.Core/DataAnnotations/TestDatetimeNotInThePast.cs @@ -1,8 +1,8 @@ using System; -using Retroactiune.DataAnnotations; +using Retroactiune.Core.DataAnnotations; using Xunit; -namespace Retroactiune.Tests.Retroactiune.WebAPI.DataAnnotations +namespace Retroactiune.Tests.Retroactiune.Core.DataAnnotations { public class TestDatetimeNotInThePast { diff --git a/Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestFeedbackReceiverService.cs b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestFeedbackReceiverService.cs similarity index 98% rename from Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestFeedbackReceiverService.cs rename to Retroactiune.UnitTests/Retroactiune.Core/Services/TestFeedbackReceiverService.cs index 13effb7..9da304f 100644 --- a/Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestFeedbackReceiverService.cs +++ b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestFeedbackReceiverService.cs @@ -5,12 +5,12 @@ using System.Threading.Tasks; using AutoFixture.Xunit2; using MongoDB.Driver; using Moq; -using Retroactiune.Database; -using Retroactiune.Models; -using Retroactiune.Services; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; using Xunit; -namespace Retroactiune.Tests.Retroactiune.WebAPI.Services +namespace Retroactiune.Tests.Retroactiune.Core.Services { public class TestFeedbackReceiverService { diff --git a/Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestTokensService.cs b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs similarity index 96% rename from Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestTokensService.cs rename to Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs index 3c95536..cce6a2b 100644 --- a/Retroactiune.UnitTests/Retroactiune.WebAPI/Services/TestTokensService.cs +++ b/Retroactiune.UnitTests/Retroactiune.Core/Services/TestTokensService.cs @@ -3,12 +3,12 @@ using System.Threading; using System.Threading.Tasks; using MongoDB.Driver; using Moq; -using Retroactiune.Database; -using Retroactiune.Models; -using Retroactiune.Services; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; using Xunit; -namespace Retroactiune.Tests.Retroactiune.WebAPI.Services +namespace Retroactiune.Tests.Retroactiune.Core.Services { public class TestTokensService { diff --git a/Retroactiune.UnitTests/Retroactiune.UnitTests.csproj b/Retroactiune.UnitTests/Retroactiune.UnitTests.csproj index 7a9678a..59b0138 100644 --- a/Retroactiune.UnitTests/Retroactiune.UnitTests.csproj +++ b/Retroactiune.UnitTests/Retroactiune.UnitTests.csproj @@ -20,7 +20,12 @@ + + + + + diff --git a/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiverController.cs b/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiverController.cs index ed44e2e..e7a61b6 100644 --- a/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiverController.cs +++ b/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestFeedbackReceiverController.cs @@ -5,9 +5,9 @@ using AutoFixture.Xunit2; using Microsoft.AspNetCore.Mvc; using Moq; using Retroactiune.Controllers; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; using Retroactiune.DataTransferObjects; -using Retroactiune.Models; -using Retroactiune.Services; using Xunit; namespace Retroactiune.Tests.Retroactiune.WebAPI.Controllers diff --git a/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestTokensController.cs b/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestTokensController.cs index 0f066a1..be51e64 100644 --- a/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestTokensController.cs +++ b/Retroactiune.UnitTests/Retroactiune.WebAPI/Controllers/TestTokensController.cs @@ -4,9 +4,10 @@ using AutoFixture.Xunit2; using Microsoft.AspNetCore.Mvc; using Moq; using Retroactiune.Controllers; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; using Retroactiune.DataTransferObjects; -using Retroactiune.Models; -using Retroactiune.Services; using Xunit; namespace Retroactiune.Tests.Retroactiune.WebAPI.Controllers diff --git a/Retroactiune.WebAPI/Controllers/FeedbackReceiversController.cs b/Retroactiune.WebAPI/Controllers/FeedbackReceiversController.cs index a9f1d32..9def126 100644 --- a/Retroactiune.WebAPI/Controllers/FeedbackReceiversController.cs +++ b/Retroactiune.WebAPI/Controllers/FeedbackReceiversController.cs @@ -7,9 +7,10 @@ using AutoMapper; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; +using Retroactiune.Core.Entities; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; using Retroactiune.DataTransferObjects; -using Retroactiune.Models; -using Retroactiune.Services; namespace Retroactiune.Controllers { diff --git a/Retroactiune.WebAPI/Controllers/TokensController.cs b/Retroactiune.WebAPI/Controllers/TokensController.cs index 8d2fe57..711c9a2 100644 --- a/Retroactiune.WebAPI/Controllers/TokensController.cs +++ b/Retroactiune.WebAPI/Controllers/TokensController.cs @@ -4,8 +4,9 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; using Retroactiune.DataTransferObjects; -using Retroactiune.Services; namespace Retroactiune.Controllers { @@ -13,7 +14,10 @@ namespace Retroactiune.Controllers [Route("api/v1/[controller]")] public class TokensController : ControllerBase { - // TODO: list tokens (unused, used) + // TODO: Implement ListTokens. + // Filters for: FeedbackReceiver IDS + // for: start < CreatedTime < end + // for start < TimeUsed end private readonly IFeedbackReceiverService _feedbackReceiverService; private readonly ITokensService _tokensService; diff --git a/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverInDto.cs b/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverInDto.cs index f2c005d..696d4a1 100644 --- a/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverInDto.cs +++ b/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverInDto.cs @@ -1,5 +1,5 @@ using System.ComponentModel.DataAnnotations; -using Retroactiune.Models; +using Retroactiune.Core.Entities; namespace Retroactiune.DataTransferObjects { diff --git a/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverOutDto.cs b/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverOutDto.cs index 406ac63..92de088 100644 --- a/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverOutDto.cs +++ b/Retroactiune.WebAPI/DataTransferObjects/FeedbackReceiverOutDto.cs @@ -1,4 +1,4 @@ -using Retroactiune.Models; +using Retroactiune.Core.Entities; namespace Retroactiune.DataTransferObjects { diff --git a/Retroactiune.WebAPI/DataTransferObjects/GenerateTokensDto.cs b/Retroactiune.WebAPI/DataTransferObjects/GenerateTokensDto.cs index ee85520..9c7082c 100644 --- a/Retroactiune.WebAPI/DataTransferObjects/GenerateTokensDto.cs +++ b/Retroactiune.WebAPI/DataTransferObjects/GenerateTokensDto.cs @@ -1,6 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; -using Retroactiune.DataAnnotations; +using Retroactiune.Core.DataAnnotations; namespace Retroactiune.DataTransferObjects { diff --git a/Retroactiune.WebAPI/MappingProfile.cs b/Retroactiune.WebAPI/MappingProfile.cs index e3c0e58..60d38e5 100644 --- a/Retroactiune.WebAPI/MappingProfile.cs +++ b/Retroactiune.WebAPI/MappingProfile.cs @@ -1,6 +1,6 @@ using AutoMapper; +using Retroactiune.Core.Entities; using Retroactiune.DataTransferObjects; -using Retroactiune.Models; namespace Retroactiune { diff --git a/Retroactiune.WebAPI/Retroactiune.WebAPI.csproj b/Retroactiune.WebAPI/Retroactiune.WebAPI.csproj index 50f595c..ae4f95a 100644 --- a/Retroactiune.WebAPI/Retroactiune.WebAPI.csproj +++ b/Retroactiune.WebAPI/Retroactiune.WebAPI.csproj @@ -14,5 +14,10 @@ + + + + + diff --git a/Retroactiune.WebAPI/Startup.cs b/Retroactiune.WebAPI/Startup.cs index 56fc8a4..e5b341b 100644 --- a/Retroactiune.WebAPI/Startup.cs +++ b/Retroactiune.WebAPI/Startup.cs @@ -9,8 +9,9 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using MongoDB.Driver; -using Retroactiune.Database; -using Retroactiune.Services; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; +using Retroactiune.Infrastructure; namespace Retroactiune { diff --git a/Retroactiune.WebAPI/TestingStartup.cs b/Retroactiune.WebAPI/TestingStartup.cs index adae6be..fe53dd3 100644 --- a/Retroactiune.WebAPI/TestingStartup.cs +++ b/Retroactiune.WebAPI/TestingStartup.cs @@ -4,8 +4,9 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using MongoDB.Driver; -using Retroactiune.Database; -using Retroactiune.Services; +using Retroactiune.Core.Interfaces; +using Retroactiune.Core.Services; +using Retroactiune.Infrastructure; namespace Retroactiune { diff --git a/Retroactiune.sln b/Retroactiune.sln index b3bf2c9..1a484c1 100644 --- a/Retroactiune.sln +++ b/Retroactiune.sln @@ -6,6 +6,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Retroactiune.UnitTests", "R EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Retroactiune.IntegrationTests", "Retroactiune.IntegrationTests\Retroactiune.IntegrationTests.csproj", "{0A585C42-6DA1-4CB8-95AC-C0E4BE49C14C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Retroactiune.Core", "Retroactiune.Core\Retroactiune.Core.csproj", "{8AAE50F4-5020-4F8F-94D9-C6DF7EA34AAC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Retroactiune.Infrastructure", "Retroactiune.Infrastructure\Retroactiune.Infrastructure.csproj", "{F5F226DC-92BC-4825-9480-0DB6C88E51A4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -24,5 +28,13 @@ Global {0A585C42-6DA1-4CB8-95AC-C0E4BE49C14C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0A585C42-6DA1-4CB8-95AC-C0E4BE49C14C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A585C42-6DA1-4CB8-95AC-C0E4BE49C14C}.Release|Any CPU.Build.0 = Release|Any CPU + {8AAE50F4-5020-4F8F-94D9-C6DF7EA34AAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AAE50F4-5020-4F8F-94D9-C6DF7EA34AAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AAE50F4-5020-4F8F-94D9-C6DF7EA34AAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AAE50F4-5020-4F8F-94D9-C6DF7EA34AAC}.Release|Any CPU.Build.0 = Release|Any CPU + {F5F226DC-92BC-4825-9480-0DB6C88E51A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5F226DC-92BC-4825-9480-0DB6C88E51A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5F226DC-92BC-4825-9480-0DB6C88E51A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5F226DC-92BC-4825-9480-0DB6C88E51A4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal