Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AlexanderAsprilla98/Tournament-Management-App/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Match management allows you to schedule games between registered teams, set match dates and times, and record scores for both home and away teams. The system tracks all matches in the tournament with complete details about participating teams and results.Match Structure
Every match in the system contains:- Date and Time: When the match is scheduled to take place
- Home Team (Local): The team playing at their home venue
- Away Team (Visitante): The visiting team
- Home Score (Marcador Local): Goals scored by the home team (0-100)
- Away Score (Marcador Visitante): Goals scored by the away team (0-100)
Creating a New Match
Access the Create Match Page
Select Match Date and Time
- Required: Yes, date and time are mandatory
- Format: DateTime field with date and time picker
- Validation: Cannot be empty
Select Home Team (Local)
- Select from dropdown of all registered teams
- This team’s venue is considered the match location
- Will be displayed as “Local” in match listings
Select Away Team (Visitante)
- Select from dropdown of all registered teams
- Can be any team except the home team
- Will be displayed as “Visitante” in match listings
Enter Match Scores
- Required field
- Must be between 0 and 100
- Numeric values only
- Required field
- Must be between 0 and 100
- Numeric values only
Viewing Matches
The Matches Index page displays all scheduled matches:Match List Display
Each match shows:- Date and time of the match
- Home team (Local) name
- Home team score
- Away team (Visitante) name
- Away team score
- Action buttons (View Details, Edit, Delete)
Typical Display Format
Editing Match Details
Select Match to Edit
Review Current Information
- Current date and time
- Currently selected home team (pre-selected in dropdown)
- Current home score
- Currently selected away team (pre-selected in dropdown)
- Current away score
Make Changes
- Reschedule Match
- Change Teams
- Update Scores
- Complete Update
Duplicate Validation
- If another match exists with the same home team, away team, and exact date/time
- If duplicate detected, you see an error message
- Modify at least one field to make the match unique
Deleting Matches
Validation Rules
Date and Time Validation
Date and Time Validation
- Required: Yes
- Type: DateTime
- Format: Full date and time
- Null Handling: Cannot be null or empty
- “La fecha del partido es obligatoria” (Match date is required)
Home Team (Local) Validation
Home Team (Local) Validation
- Required: Yes
- Type: Foreign key reference to Team entity
- Selection: Dropdown with all available teams
- Relationship: One match has one home team
Home Score (Marcador Local) Validation
Home Score (Marcador Local) Validation
- Required: Yes
- Type: Integer
- Range: 0 to 100
- Minimum: 0 (no negative scores)
- Maximum: 100 (upper limit for data integrity)
- “El Marcador Local es obligatorio” (Home score is required)
- “Marcador Local debe estar en un rango entre 0 y 100” (Score must be 0-100)
Away Team (Visitante) Validation
Away Team (Visitante) Validation
- Required: Yes
- Type: Foreign key reference to Team entity
- Selection: Dropdown with all available teams
- Relationship: One match has one away team
Away Score (Marcador Visitante) Validation
Away Score (Marcador Visitante) Validation
- Required: Yes
- Type: Integer
- Range: 0 to 100
- Minimum: 0 (no negative scores)
- Maximum: 100 (upper limit for data integrity)
- “El Marcador Visitante es obligatoria” (Away score is required)
- “Marcador Visitante debe estar en un rango entre 0 y 100” (Score must be 0-100)
Duplicate Match Validation
Duplicate Match Validation
- Same home team (Local)
- Same away team (Visitante)
- Same exact date and time
- Same teams playing at different times
- Different teams playing at the same time
- Rematch between teams on different dates
Prerequisites for Creating Matches
Minimum Two Teams Required
equiposExits = equipos.Count() >= 2 ? true : falseIf fewer than 2 teams exist, the creation page displays a warning and may disable match creation.Match Relationships
Home Team Relationship
- Property:
Local - Type: Many-to-One
- Description: Many matches can have the same home team
- Required: Yes
- Inverse Property: Team has
PartidosLocalcollection
Away Team Relationship
- Property:
Visitante - Type: Many-to-One
- Description: Many matches can have the same away team
- Required: Yes
- Inverse Property: Team has
PartidosVisitantecollection
Common Workflows
- Schedule Future Match
- Record Match Results
- Reschedule Match
- Create Match with Results
- Navigate to Matches > Create New
- Select future date and time
- Choose home team
- Choose away team
- Enter 0 for both scores (or leave as default)
- Submit form
- Match appears in schedule
- Edit later to update scores after match is played
Score Range Explanation
The system allows scores from 0 to 100:- Typical Range: Most soccer matches have scores between 0-10
- Extended Range: The 0-100 range accommodates:
- Standard soccer matches
- Aggregate scores (if tracking tournament totals)
- Unusual high-scoring games
- Data integrity and testing scenarios
Error Handling
Duplicate Match Error
Duplicate Match Error
duplicate = true- Error message displayed
- Form redisplays with current input preserved
- Team selections remain populated
- User must modify teams or date/time to proceed
Insufficient Teams Error
Insufficient Teams Error
equiposExits = false- Warning message displayed on creation page
- Cannot create match until more teams are registered
- User directed to create teams first
Validation Errors
Validation Errors
ModelState.IsValid = false- Specific error messages for each invalid field
- Form redisplays with user input
- Dropdowns repopulated with available teams
Deletion Errors
Deletion Errors
ErrorEliminar = true- Error message displayed in Matches Index
- Match remains in system
- Matches list refreshes to show all matches
Data Model
The match entity structure from the source code:Team Match History
Each team maintains relationships to their matches:- All matches where a team played at home
- All matches where a team played away
- Complete match history for each team
- Team performance statistics