Refactor repositories and enhance documentation

- Mark `IEmailTemplateRepository` and `_repository` in `ReadEmailTemplateQueryHandler` as obsolete, suggesting the use of `IRepository`.
- Update `ResetEmailTemplateCommand` with additional documentation and examples for `Type`.
- Change return type of `CreateEnvelopeReceiverCommand` to `IRequest<CreateEnvelopeReceiverResponse>`.
- Improve caching methods in `CacheExtensions.cs` for better functionality and clarity.
- Add XML documentation to the `Ok` method in `MappingExtensions`.
- Make `UserReference` property required in `ReadHistoryResponse`.
This commit is contained in:
2025-06-30 13:56:49 +02:00
parent 1c51fafb69
commit 9756303d6e
9 changed files with 263 additions and 155 deletions

View File

@@ -10,6 +10,7 @@ namespace EnvelopeGenerator.Application.Histories.Queries.Read;
/// </summary>
public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumerable<ReadHistoryResponse>>
{
[Obsolete("Use IRepository")]
private readonly IEnvelopeHistoryRepository _repository;
private readonly IMapper _mapper;
@@ -19,6 +20,7 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
/// </summary>
/// <param name="repository"></param>
/// <param name="mapper"></param>
[Obsolete("Use IRepository")]
public ReadHistoryQueryHandler(IEnvelopeHistoryRepository repository, IMapper mapper)
{
_repository = repository;
@@ -41,4 +43,4 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
return _mapper.Map<IEnumerable<ReadHistoryResponse>>(hists);
}
}
}

View File

@@ -20,7 +20,7 @@ public class ReadHistoryResponse
/// <summary>
/// Gets or sets the reference identifier of the user who performed the action.
/// </summary>
public string UserReference { get; set; }
public required string UserReference { get; set; }
/// <summary>
/// Gets or sets the status code of the envelope.