Refactor EnvelopeTypeDto to EnvelopeTypeDefaultsDto
Renamed `EnvelopeTypeDto` to `EnvelopeTypeDefaultsDto` to better reflect its purpose as a DTO for default envelope type configurations. Updated all references to `EnvelopeTypeDto` across the application, including: - Service interfaces (`IEnvelopeTypeService`) and implementations. - AutoMapper mappings in `MappingProfile.cs`. - Query handlers (`ReadEnvelopeTypesQuery` and `ReadEnvelopeTypesQueryHandler`). - Razor components (`CreateEnvelopeWizardPopup.razor`, `SenderEditorPage.razor`, `SenderPage.razor`). - Client-side services (`EnvelopeTypeService`). - Controller (`TestEnvelopeTypeController`). These changes ensure consistency and clarity in naming conventions while maintaining functionality.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace EnvelopeGenerator.Application.Services;
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public class EnvelopeTypeService : BasicCRUDService<IEnvelopeTypeRepository, EnvelopeTypeDto, EnvelopeTypeDefaults, int>, IEnvelopeTypeService
|
||||
public class EnvelopeTypeService : BasicCRUDService<IEnvelopeTypeRepository, EnvelopeTypeDefaultsDto, EnvelopeTypeDefaults, int>, IEnvelopeTypeService
|
||||
{
|
||||
private static readonly Guid CacheKey = Guid.NewGuid();
|
||||
|
||||
@@ -36,8 +36,8 @@ public class EnvelopeTypeService : BasicCRUDService<IEnvelopeTypeRepository, Env
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override async Task<DataResult<IEnumerable<EnvelopeTypeDto>>> ReadAllAsync()
|
||||
public override async Task<DataResult<IEnumerable<EnvelopeTypeDefaultsDto>>> ReadAllAsync()
|
||||
=> await _cache.GetOrCreateAsync(CacheKey, async entry => await base.ReadAllAsync())
|
||||
?? Result.Fail<IEnumerable<EnvelopeTypeDto>>().Notice(LogLevel.Error, Flag.NotFound, "No cached envelope types are available in the database. If you have added any envelope types after the server started, please restart the server.");
|
||||
?? Result.Fail<IEnumerable<EnvelopeTypeDefaultsDto>>().Notice(LogLevel.Error, Flag.NotFound, "No cached envelope types are available in the database. If you have added any envelope types after the server started, please restart the server.");
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user