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`.
This commit is contained in:
60
src/ReC.Application/Dto/RecActionDto.cs
Normal file
60
src/ReC.Application/Dto/RecActionDto.cs
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
namespace ReC.Application.Dto;
|
||||||
|
|
||||||
|
public class RecActionDto
|
||||||
|
{
|
||||||
|
public long? ActionId { get; init; }
|
||||||
|
|
||||||
|
public long? ProfileId { get; init; }
|
||||||
|
|
||||||
|
public string? ProfileName { get; init; }
|
||||||
|
|
||||||
|
public string? ProfileType { get; init; }
|
||||||
|
|
||||||
|
public byte? ProfileSequence { get; init; }
|
||||||
|
|
||||||
|
public long? EndpointId { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointUri { get; init; }
|
||||||
|
|
||||||
|
public long? EndpointAuthId { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthType { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthApiKey { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthApiValue { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthApiKeyAddTo { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthToken { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthUsername { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthPassword { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthDomain { get; init; }
|
||||||
|
|
||||||
|
public string? EndpointAuthWorkstation { get; init; }
|
||||||
|
|
||||||
|
public short? EndpointParamsId { get; init; }
|
||||||
|
|
||||||
|
public short? SqlConnectionId { get; init; }
|
||||||
|
|
||||||
|
public string? SqlConnectionServer { get; init; }
|
||||||
|
|
||||||
|
public string? SqlConnectionDb { get; init; }
|
||||||
|
|
||||||
|
public string? SqlConnectionUsername { get; init; }
|
||||||
|
|
||||||
|
public string? SqlConnectionPassword { get; init; }
|
||||||
|
|
||||||
|
public string? RestType { get; init; }
|
||||||
|
|
||||||
|
public string? PreprocessingQuery { get; init; }
|
||||||
|
|
||||||
|
public string? HeaderQuery { get; init; }
|
||||||
|
|
||||||
|
public string? BodyQuery { get; init; }
|
||||||
|
|
||||||
|
public string? PostprocessingQuery { get; init; }
|
||||||
|
}
|
||||||
@@ -6,4 +6,12 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MediatR" Version="13.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ReC.Domain\ReC.Domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using MediatR;
|
||||||
|
using ReC.Application.Dto;
|
||||||
|
|
||||||
|
namespace ReC.Application.RecActions.Queries;
|
||||||
|
|
||||||
|
public class ReadRecActionQuery : IRequest<IEnumerable<RecActionDto>>
|
||||||
|
{
|
||||||
|
public int ProfileId { get; init; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user