Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion Honamic.Framework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.Todo.Endpoints.WebA
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{196209A4-3BCC-442B-9686-CF311ADEBF6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Honamic.Framework.Tools.IdGenerators", "src\Tools\Honamic.Framework.Tools.IdGenerators\Honamic.Framework.Tools.IdGenerators.csproj", "{462B177A-3E97-4F60-A141-7A01F8B437B5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.Framework.Tools.IdGenerators", "src\Tools\Honamic.Framework.Tools.IdGenerators\Honamic.Framework.Tools.IdGenerators.csproj", "{462B177A-3E97-4F60-A141-7A01F8B437B5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IdentityPlus", "IdentityPlus", "{7ACD81EB-9F97-44A5-B91B-2E12C5F45607}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.IdentityPlus.Persistence", "src\IdentityPlus\Persistence\Honamic.IdentityPlus.Persistence.csproj", "{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.IdentityPlus.Domain.Abstractions", "src\IdentityPlus\Domain.Abstractions\Honamic.IdentityPlus.Domain.Abstractions.csproj", "{81DDE308-A3CF-4502-8CFF-A1A5411EE37D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.IdentityPlus.Application", "src\IdentityPlus\Application\Honamic.IdentityPlus.Application.csproj", "{A46468C4-5C78-459C-BAF0-AF358CA57B65}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.IdentityPlus.Domain", "src\IdentityPlus\Domain\Honamic.IdentityPlus.Domain.csproj", "{B2FA9794-6654-4B7D-B996-EEB6F0C36072}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Honamic.IdentityPlus.WebApi", "src\IdentityPlus\WebApi\Honamic.IdentityPlus.WebApi.csproj", "{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -225,6 +237,26 @@ Global
{462B177A-3E97-4F60-A141-7A01F8B437B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{462B177A-3E97-4F60-A141-7A01F8B437B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{462B177A-3E97-4F60-A141-7A01F8B437B5}.Release|Any CPU.Build.0 = Release|Any CPU
{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3}.Release|Any CPU.Build.0 = Release|Any CPU
{81DDE308-A3CF-4502-8CFF-A1A5411EE37D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81DDE308-A3CF-4502-8CFF-A1A5411EE37D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81DDE308-A3CF-4502-8CFF-A1A5411EE37D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81DDE308-A3CF-4502-8CFF-A1A5411EE37D}.Release|Any CPU.Build.0 = Release|Any CPU
{A46468C4-5C78-459C-BAF0-AF358CA57B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A46468C4-5C78-459C-BAF0-AF358CA57B65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A46468C4-5C78-459C-BAF0-AF358CA57B65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A46468C4-5C78-459C-BAF0-AF358CA57B65}.Release|Any CPU.Build.0 = Release|Any CPU
{B2FA9794-6654-4B7D-B996-EEB6F0C36072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2FA9794-6654-4B7D-B996-EEB6F0C36072}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2FA9794-6654-4B7D-B996-EEB6F0C36072}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2FA9794-6654-4B7D-B996-EEB6F0C36072}.Release|Any CPU.Build.0 = Release|Any CPU
{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -274,6 +306,12 @@ Global
{AED57B53-F951-4DE2-9367-18BD2DD063BB} = {39275E89-52E0-4D1B-ABD5-5A8D334A0A8D}
{196209A4-3BCC-442B-9686-CF311ADEBF6D} = {E9FC6BF1-7A52-43AD-90F3-E8A20BE3FE99}
{462B177A-3E97-4F60-A141-7A01F8B437B5} = {196209A4-3BCC-442B-9686-CF311ADEBF6D}
{7ACD81EB-9F97-44A5-B91B-2E12C5F45607} = {E9FC6BF1-7A52-43AD-90F3-E8A20BE3FE99}
{CD6164DC-0762-4E6E-8BAC-2D56CEB8C8C3} = {7ACD81EB-9F97-44A5-B91B-2E12C5F45607}
{81DDE308-A3CF-4502-8CFF-A1A5411EE37D} = {7ACD81EB-9F97-44A5-B91B-2E12C5F45607}
{A46468C4-5C78-459C-BAF0-AF358CA57B65} = {7ACD81EB-9F97-44A5-B91B-2E12C5F45607}
{B2FA9794-6654-4B7D-B996-EEB6F0C36072} = {7ACD81EB-9F97-44A5-B91B-2E12C5F45607}
{DBE18797-E5D4-4000-8BE8-D0F3BA1F8C9A} = {7ACD81EB-9F97-44A5-B91B-2E12C5F45607}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E15D83FC-8F5C-4D9C-9DCD-D114F5609922}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using Honamic.Todo.Application.TodoItems.CommandHandlers;
using Honamic.Todo.Domain.Extensions;
using Honamic.Framework.Tools.IdGenerators;
using Honamic.Todo.Application.TodoItems.EventHandlers;
using Honamic.IdentityPlus.Domain.Users;

namespace Honamic.Todo.Application.Extensions;

Expand All @@ -14,6 +16,7 @@ public static void AddApplicationServices(this IServiceCollection services, ICon
{
services.AddDefaultApplicationsServices();
services.AddCommandHandlers();
services.AddEventHandlers();
services.AddDomainServices();
services.AddSnowflakeIdGeneratorServices();
}
Expand All @@ -23,4 +26,10 @@ private static void AddCommandHandlers(this IServiceCollection services)
services.AddCommandHandler<DeleteTodoItemCommand, DeleteTodoItemCommandHandler>();
services.AddCommandHandler<CreateTodoItemCommand, CreateTodoItemCommandHandler>();
}

private static void AddEventHandlers(this IServiceCollection services)
{
services.AddEventHandler<UserCreatedEvent, UserCreatedEventHandler>();
services.AddEventHandler<UserLoggedEvent, UserLoggedEventHandler>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\src\Core\Applications\Honamic.Framework.Applications.csproj" />
<ProjectReference Include="..\..\..\src\IdentityPlus\Domain.Abstractions\Honamic.IdentityPlus.Domain.Abstractions.csproj" />
<ProjectReference Include="..\..\..\src\Tools\Honamic.Framework.Tools.IdGenerators\Honamic.Framework.Tools.IdGenerators.csproj" />
<ProjectReference Include="..\Application.Contracts\Honamic.Todo.Application.Contracts.csproj" />
<ProjectReference Include="..\Domain\Honamic.Todo.Domain.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Honamic.Framework.Events;
using Honamic.IdentityPlus.Domain.Users;

namespace Honamic.Todo.Application.TodoItems.EventHandlers;
public class UserCreatedEventHandler : IEventHandler<UserCreatedEvent>
{
public Task HandleAsync(UserCreatedEvent eventToHandle)
{
return Task.CompletedTask;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Honamic.Framework.Events;
using Honamic.IdentityPlus.Domain.Users;

namespace Honamic.Todo.Application.TodoItems.EventHandlers;
public class UserLoggedEventHandler : IEventHandler<UserLoggedEvent>
{
public Task HandleAsync(UserLoggedEvent eventToHandle)
{
return Task.CompletedTask;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Honamic.Framework.Endpoints.Web.Extensions;
using Honamic.Framework.Utilities.Web.Json;
using Honamic.Todo.Facade.Extensions;
using Honamic.IdentityPlus.WebApi.Extensions;

namespace Honamic.Todo.Endpoints.WebApi.Extensions;

Expand All @@ -9,7 +10,9 @@ public static class ServiceCollectionExtensions
public static IServiceCollection ConfigureServices(this IServiceCollection services, IConfiguration configuration)
{
services.AddFacades(configuration);
services.AddIdentityPlusApiEndpoint();
services.AddEndpointsServices(configuration);

return services;
}

Expand All @@ -22,7 +25,7 @@ private static void AddEndpointsServices(this IServiceCollection services, IConf
c.JsonSerializerOptions
.Converters.Add(new CustomLongToStringConverter());
});
services.AddEndpointsApiExplorer();
services.AddEndpointsApiExplorer();
services.AddSwaggerGen();
services.AddCors();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Honamic.Framework.Endpoints.Web.Extensions;
using Honamic.Framework.Facade.Web.Middleware;

using Honamic.IdentityPlus.WebApi.Extensions;
namespace Honamic.Todo.Endpoints.WebApi.Extensions;

public static class WebApplicationExtensions
Expand Down Expand Up @@ -29,6 +29,8 @@ public static WebApplication UseConfigurations(this WebApplication app)

app.UseAuthorization();

app.MapIdentityPlusApi();

app.MapControllers();

return app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Endpoints\Web\Honamic.Framework.Endpoints.Web.csproj" />
<ProjectReference Include="..\..\..\..\src\Facade\Web\Honamic.Framework.Facade.Web.csproj" />
<ProjectReference Include="..\..\..\..\src\IdentityPlus\WebApi\Honamic.IdentityPlus.WebApi.csproj" />
<ProjectReference Include="..\..\..\Facade\Honamic.Todo.Facade.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Honamic.Todo.Domain.TodoItems;
using Honamic.Todo.Domain;
using Honamic.Todo.Persistence.EntityFramework.TodoItems;
using Honamic.IdentityPlus.Persistence.Extensions;


namespace Honamic.Todo.Persistence.EntityFramework.Extensions;
Expand All @@ -28,6 +29,8 @@ public static void AddPersistenceEntityFrameworkServices(this IServiceCollection
services.AddScoped<DbContext>((sp) => sp.GetRequiredService<TodoDbContext>());
services.AddTransient<ITodoItemRepository, TodoItemRepository>();
services.AddUnitOfWorkByEntityFramework();

services.AddIdentityPlusPersistence();
}

private static void DebuggerConnectionStringLog(string? SqlServerConnection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\src\EntityFramework\Persistence\Honamic.Framework.EntityFramework.Persistence.csproj" />
<ProjectReference Include="..\..\..\src\IdentityPlus\Persistence\Honamic.IdentityPlus.Persistence.csproj" />
<ProjectReference Include="..\..\core\domain\Honamic.Todo.Domain.csproj" />
</ItemGroup>

Expand Down
Loading