Implemented complete CQRS pattern for System Configuration management:
Commands:
- SetConfigurationValueCommand: Create or update configurations with history tracking
- DeactivateConfigurationCommand: Deactivate configurations with audit trail
Queries:
- GetConfigurationByKeyQuery: Retrieve configuration by Scope and Key
- GetAllConfigurationsQuery: List all configurations with filters and pagination
- GetConfigurationHistoryQuery: View complete audit history for any configuration
Features:
- All commands include FluentValidation validators
- History recording to SystemConfigurationHistory table
- Pagination support for list queries
- DTOs for clean data transfer
- Null-safe implementations
Updated:
- IApplicationDbContext: Added 11 new DbSets for network-club entities
- GlobalUsings: Added new entity namespaces
Build Status: ✅ Success (0 errors, 184 warnings in legacy code)
20 lines
644 B
C#
20 lines
644 B
C#
namespace CMSMicroservice.Application.ConfigurationCQ.Queries.GetAllConfigurations;
|
|
|
|
public class GetAllConfigurationsResponseDto
|
|
{
|
|
public MetaData MetaData { get; set; }
|
|
public List<GetAllConfigurationsResponseModel> Models { get; set; }
|
|
}
|
|
|
|
public class GetAllConfigurationsResponseModel
|
|
{
|
|
public long Id { get; set; }
|
|
public ConfigurationScope Scope { get; set; }
|
|
public string Key { get; set; }
|
|
public string Value { get; set; }
|
|
public string? Description { get; set; }
|
|
public bool IsActive { get; set; }
|
|
public DateTimeOffset Created { get; set; }
|
|
public DateTimeOffset? LastModified { get; set; }
|
|
}
|