Refactor: replace RecActionDto with RecActionViewDto
Standardize usage of RecActionViewDto across the codebase: - Update pipeline behaviors, mapping profiles, and commands to use RecActionViewDto. - Remove RecActionDto and introduce RecActionViewDto with equivalent properties and methods. - Adjust query handlers and related interfaces to work with RecActionViewDto. This clarifies DTO usage and aligns the model with domain intent.
This commit is contained in:
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace ReC.Application.Common.Behaviors;
|
||||
|
||||
public class BodyQueryBehavior<TRequest, TResponse>(IRecDbContext dbContext) : IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : RecActionDto
|
||||
where TRequest : RecActionViewDto
|
||||
where TResponse : notnull
|
||||
{
|
||||
public async Task<TResponse> Handle(TRequest action, RequestHandlerDelegate<TResponse> next, CancellationToken cancel)
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text.Json;
|
||||
namespace ReC.Application.Common.Behaviors;
|
||||
|
||||
public class HeaderQueryBehavior<TRequest, TResponse>(IRecDbContext dbContext, ILogger<HeaderQueryBehavior<TRequest, TResponse>>? logger = null) : IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : RecActionDto
|
||||
where TRequest : RecActionViewDto
|
||||
where TResponse : notnull
|
||||
{
|
||||
public async Task<TResponse> Handle(TRequest action, RequestHandlerDelegate<TResponse> next, CancellationToken cancel)
|
||||
|
||||
Reference in New Issue
Block a user