From 5466b35b9512849ecc5f51e04ae8b21ee9596a52 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 30 Jul 2025 15:00:05 +0200 Subject: [PATCH] feat(Repositories.DependencyInjection): add config, controlTf, state and button repositories with auto-mapper configurations. --- .../DependencyInjection.cs | 15 +++++++++++++-- .../WorkFlow.Infrastructure.csproj | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/WorkFlow.Infrastructure/DependencyInjection.cs b/src/WorkFlow.Infrastructure/DependencyInjection.cs index 5f92956..80d5eea 100644 --- a/src/WorkFlow.Infrastructure/DependencyInjection.cs +++ b/src/WorkFlow.Infrastructure/DependencyInjection.cs @@ -1,6 +1,12 @@ -using Microsoft.Extensions.DependencyInjection; +using DigitalData.Core.Infrastructure; +using DigitalData.Core.Infrastructure.AutoMapper; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using WorkFlow.Application.Contracts.Repositories; +using WorkFlow.Application.Dto.Config; +using WorkFlow.Application.Dto.ProfileControlsTF; +using WorkFlow.Application.Dto.State; +using WorkFlow.Domain.Entities; using WorkFlow.Infrastructure.Repositories; namespace WorkFlow.Infrastructure; @@ -9,13 +15,18 @@ public static class DependencyInjection { public static IServiceCollection AddWorkFlowRepositories(this IServiceCollection services) { - services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); + + services.AddDbRepository(c => c.Configs).UseAutoMapper(typeof(ConfigUpdateDto)); + services.AddDbRepository(c => c.ProfileControlsTFs).UseAutoMapper(typeof(ProfileControlsTFUpdateDto)); + services.AddDbRepository(c => c.States).UseAutoMapper(typeof(StateUpdateDto)); + services.AddDbRepository(c => c.Buttons).UseAutoMapper(); + return services; } } \ No newline at end of file diff --git a/src/WorkFlow.Infrastructure/WorkFlow.Infrastructure.csproj b/src/WorkFlow.Infrastructure/WorkFlow.Infrastructure.csproj index 49b89f6..e969181 100644 --- a/src/WorkFlow.Infrastructure/WorkFlow.Infrastructure.csproj +++ b/src/WorkFlow.Infrastructure/WorkFlow.Infrastructure.csproj @@ -9,6 +9,7 @@ +