Commit Graph

6 Commits

Author SHA1 Message Date
495a5247bc Add InvokeRecActionQuery class for MediatR request
Introduced the `InvokeRecActionQuery` class in the `ReC.Application.RecActions.Commands` namespace to implement the Mediator pattern using the MediatR library.

- Added `using MediatR;` directive to include the library.
- Implemented `IRequest` interface in the new class.
- Added `ProfileId` property with `init` accessor for immutability.
- Organized the code under a new namespace for better structure.
2025-11-25 17:07:39 +01:00
d62175f6ec Make LuckyPennySoftwareLicenseKey nullable
Updated the `LuckyPennySoftwareLicenseKey` property in the
`ConfigurationOptions` class to allow null values by changing
it from a non-nullable string with a default value of an empty
string to a nullable string (`string?`). This change enables
explicit representation of the absence of a license key using
`null` instead of an empty string.
2025-11-25 16:37:37 +01:00
a6cb0081ee Add DependencyInjection class for service registration
Introduced a new `DependencyInjection` class in the `ReC.Application` namespace to streamline service registration.

- Added `AddRecServices` extension method for `IServiceCollection` to configure AutoMapper and MediatR with assembly scanning.
- Included `ConfigurationOptions` class to allow configuration of a `LuckyPennySoftwareLicenseKey`.
- Added `using` directives for `Microsoft.Extensions.DependencyInjection` and `System.Reflection` to support dependency injection and assembly scanning.
2025-11-25 16:33:18 +01:00
7214b09640 Add AutoMapper and MediatR; implement DtoMappingProfile
Added `AutoMapper` and `MediatR` NuGet packages to the
`ReC.Application.csproj` file to include these libraries as
dependencies.

Created a `DtoMappingProfile` class in the `ReC.Application.Dto`
namespace to define a mapping configuration between the `RecAction`
entity and the `RecActionDto` data transfer object using `AutoMapper`.

Included necessary `using` directives for `AutoMapper` and
`ReC.Domain.Entities` in the `DtoMappingProfile.cs` file to enable
the mapping functionality.

These changes improve maintainability by automating object-to-object
mapping and prepare the project for potential use of the mediator
pattern with `MediatR`.
2025-11-25 15:38:53 +01:00
21d09df037 Add MediatR, RecActionDto, and ReadRecActionQuery
Added the `MediatR` NuGet package (v13.1.0) to enable the mediator pattern. Updated `ReC.Application.csproj` to include a project reference to `ReC.Domain`.

Introduced `RecActionDto` as a Data Transfer Object (DTO) for representing "RecAction" details, including properties for endpoints, authentication, and SQL connections.

Added `ReadRecActionQuery` to handle queries for retrieving `RecActionDto` objects, leveraging MediatR. This query filters results based on `ProfileId`.
2025-11-25 15:33:32 +01:00
72e4f53b5d Add ReC.Application project to the solution
A new project, `ReC.Application`, has been added to the solution (`ReC.sln`).
The project file (`ReC.Application.csproj`) targets .NET 8.0, enables implicit
global usings, and enables nullable reference types.

The solution file has been updated to include the new project, its build
configurations, and its nesting under the `src` folder.
2025-11-25 00:36:34 +01:00