Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rec-IM] participant matches #1051

Merged
merged 10 commits into from
Jun 5, 2024
Merged

Conversation

amos-cha
Copy link
Contributor

@amos-cha amos-cha commented Jun 5, 2024

API route for displaying a participant's matches (future and past). Handles the API side of https://github.com/gordon-cs/RecIM-Docs/issues/104

Co-authored-by: Evan Platzer <evan.platzer@gmail.com>
@amos-cha amos-cha requested a review from EjPlatzer June 5, 2024 18:42
Comment on lines 139 to 141
.Include(mt => mt.Match)
.ThenInclude(m => m.MatchTeam)
.ThenInclude(mt => mt.Match)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not a circular include? Aren't you including MatchTeam.Match.MatchTeam.Match?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not EXACTLY, the reason I need any of these includes is because of the implicit operators on the viewmodels. Unless specified, they do not actually hold any of their perceived connections.

The logic flow unfortunately right now is as follows:

MatchTeam(1) is connected via a participant's current team list,
I then get the Match from that MatchTeam(1)
I then need ALL MatchTeam(1->x) connected to the Match
The implicit operator is used on the MatchTeam(1->x) which actually loses its connection to Match and thus loses its properties.

So yes, it's "circular" but not really?

Gordon360/Services/RecIM/ParticipantService.cs Outdated Show resolved Hide resolved
Copy link
Contributor

@EjPlatzer EjPlatzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@amos-cha amos-cha merged commit 668b422 into develop Jun 5, 2024
3 checks passed
@amos-cha amos-cha deleted the s24-recim-participant-matches branch June 5, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rec-IM s24 Summer Practicum 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants