From 0f3fd320b0f1e74e87f4d592c79369b3b05faa3e Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 4 Dec 2025 14:46:30 +0100 Subject: [PATCH] Refactor RootAction to Root in RecActionView Renamed the `RootAction` property to `Root` in the `RecActionView` class to improve clarity and align with naming conventions. Updated the `ReadRecActionQueryHandler` class to reference the renamed property in its LINQ query, ensuring consistency between the data model and query logic. --- src/ReC.Application/RecActions/Queries/ReadRecActionQuery.cs | 2 +- src/ReC.Domain/Entities/RecActionView.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReC.Application/RecActions/Queries/ReadRecActionQuery.cs b/src/ReC.Application/RecActions/Queries/ReadRecActionQuery.cs index 07374de..c1ecac6 100644 --- a/src/ReC.Application/RecActions/Queries/ReadRecActionQuery.cs +++ b/src/ReC.Application/RecActions/Queries/ReadRecActionQuery.cs @@ -26,7 +26,7 @@ public class ReadRecActionQueryHandler(IRepository repo, IMapper { public async Task> Handle(ReadRecActionQuery request, CancellationToken cancel) { - var actions = await repo.Where(act => act.ProfileId == request.ProfileId).Where(act => act.RootAction!.OutRes != null).ToListAsync(cancel); + var actions = await repo.Where(act => act.ProfileId == request.ProfileId).Where(act => act.Root!.OutRes != null).ToListAsync(cancel); if(actions.Count == 0) throw new NotFoundException($"No actions found for the profile {request.ProfileId}."); diff --git a/src/ReC.Domain/Entities/RecActionView.cs b/src/ReC.Domain/Entities/RecActionView.cs index 1bfb97b..37aef51 100644 --- a/src/ReC.Domain/Entities/RecActionView.cs +++ b/src/ReC.Domain/Entities/RecActionView.cs @@ -18,7 +18,7 @@ public class RecActionView public required long Id { get; set; } [ForeignKey("Id")] - public RecAction? RootAction { get; set; } + public RecAction? Root { get; set; } [Column("PROFILE_ID")] public long? ProfileId { get; set; }