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.
This commit is contained in:
@@ -26,7 +26,7 @@ public class ReadRecActionQueryHandler(IRepository<RecActionView> repo, IMapper
|
||||
{
|
||||
public async Task<IEnumerable<RecActionDto>> 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}.");
|
||||
|
||||
Reference in New Issue
Block a user