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:
parent
3b6df031a6
commit
0f3fd320b0
@ -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}.");
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user