Deprecate services in favor of MediatR integration

This commit introduces the `[Obsolete("Use MediatR")]` attribute to various service fields and methods across multiple controllers and extension classes, signaling a transition to MediatR for handling requests and commands.

Key changes include:
- Marking `IEnvelopeService`, `IEnvelopeReceiverService`, and `IEnvelopeTypeService` as obsolete in their respective controllers.
- Updating `AddEnvelopeGeneratorInfrastructureServices` to utilize `IRepository`.
- Refactoring `AddCommandManagerRunner` and `CreateHost` methods to indicate obsolescence.
- Replacing `DigitalData.Core.DTO` with `DigitalData.Core.Abstraction.Application.DTO` in using directives.

These changes modernize the codebase and improve command and query handling while cleaning up service dependencies.
This commit is contained in:
2025-06-30 10:05:36 +02:00
parent e4c6714677
commit 1c90e693da
7 changed files with 37 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ namespace EnvelopeGenerator.Tests.Application;
public class Mock
{
[Obsolete("Use MediatR")]
public static IHost CreateHost(Action<HostApplicationBuilder>? builderOptions = null, string configPath = "appsettings.json", bool useRealDb = false, params string[] args)
{
var builder = Host.CreateApplicationBuilder(args.Any() ? args : null);