Refactor DTOs and MappingProfile for consistency
Standardized namespaces for DTO classes and redefined several records to include necessary properties. Removed mapping configurations from MappingProfile, indicating a potential refactor. Introduced ProfileObjStateDto with a States property and ensured ProfileControlsTFDto and StateDto are properly encapsulated.
This commit is contained in:
@@ -3,9 +3,6 @@ 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;
|
||||
|
||||
@@ -18,11 +15,11 @@ public static class DependencyInjection
|
||||
services.TryAddScoped<IProfileRepository, ProfileRepository>();
|
||||
services.TryAddScoped<IProfileObjRepository, ProfileObjRepository>();
|
||||
|
||||
services.AddDbRepository<WFDBContext, Config>(c => c.Configs).UseAutoMapper(typeof(ConfigUpdateDto));
|
||||
services.AddDbRepository<WFDBContext, ProfileControlsTF>(c => c.ProfileControlsTFs).UseAutoMapper(typeof(ProfileControlsTFUpdateDto));
|
||||
services.AddDbRepository<WFDBContext, State>(c => c.States).UseAutoMapper(typeof(StateUpdateDto));
|
||||
services.AddDbRepository<WFDBContext, Config>(c => c.Configs).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, ProfileControlsTF>(c => c.ProfileControlsTFs).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, State>(c => c.States).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, Button>(c => c.Buttons).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, State>(c => c.States).UseAutoMapper(typeof(StateUpdateDto));
|
||||
services.AddDbRepository<WFDBContext, State>(c => c.States).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, ProfileObjState>(c => c.ProfileObjStates).UseAutoMapper();
|
||||
|
||||
return services;
|
||||
|
||||
Reference in New Issue
Block a user