Skip to main content

Overview

The Posicion (Position) entity represents a playing position in the tournament management system. Positions define where players play on the field (e.g., Forward, Midfielder, Defender, Goalkeeper). Multiple players can share the same position across different teams.

Properties

int
Unique identifier for the position.
string
required
Name of the position.Validation Rules:
  • Required field (cannot be empty)
  • Must contain only letters and spaces
  • Cannot consist of numbers only
  • Minimum length: 3 characters
  • Maximum length: 30 characters
  • Regex pattern: ^(?![0-9]+$)[a-zA-ZÀ-ÿ\s]+$
Default Value: Empty stringDisplay Name: “Nombre de la posición”Error Messages:
  • Pattern mismatch: “Valor Incorrecto.”
  • Required: “El nombre de la posicion es obligatoria.”
  • Max length: “La posición no puede contener más de 30 caracteres”
  • Min length: “La posición no puede contener menos de 3 caracteres”
List<Jugador>?
Collection of players assigned to this position.Nullable: YesDefault Value: Empty listRelationship: One-to-Many (One position can be assigned to multiple players)Related Entity: Jugador

Relationships

Players (Jugadores)

List<Jugador>
A position can be assigned to multiple players across different teams. This is a one-to-many relationship where the position is the parent entity.Navigation Property: JugadoresCardinality: One position to many players (0..*)Related Entity: JugadorBusiness Rule: Multiple players can have the same position, and a position can exist without any assigned players.
Positions are typically standard across all teams (e.g., Goalkeeper, Defender, Midfielder, Forward), but the same position entity is shared across all players in the tournament.

Validation Attributes

The Posicion entity uses the following Data Annotations:
  • [Required] - Ensures the position name is mandatory
  • [RegularExpression] - Validates name contains only letters and spaces, no numbers only
  • [MaxLength] / [MinLength] - Enforces character length constraints
  • [Display] - Provides user-friendly display name

Code Examples

Entity Definition

Creating Positions

Common Football Positions (Spanish)

Valid Name Examples

Invalid Name Examples

These examples will fail validation:

Querying Positions

Assigning Positions to Players

Position Statistics

Position-Based Team Analysis

Formation Analysis

Position Management

Common Use Cases

Squad Balance Checking

Position Conversion Report

Business Rules

Position Standards

Common business rules for positions:
  • Positions should be standardized across the tournament
  • Consider creating positions during system initialization
  • Validate that teams have at least one goalkeeper
  • Enforce minimum players per position for match eligibility

Position Naming

Best practices:
  • Use consistent Spanish terminology
  • Avoid abbreviations in position names
  • Consider regional variations (e.g., “Arquero” vs “Portero”)
  • Document position definitions for clarity

Standard Football Positions

Defensive Positions

  • Portero / Arquero - Goalkeeper
  • Defensa Central - Center Back
  • Lateral Derecho - Right Back
  • Lateral Izquierdo - Left Back
  • Líbero - Sweeper

Midfield Positions

  • Pivote / Volante de Contención - Defensive Midfielder
  • Mediocampista / Medio Centro - Central Midfielder
  • Extremo Derecho - Right Winger
  • Extremo Izquierdo - Left Winger
  • Media Punta - Attacking Midfielder

Forward Positions

  • Delantero Centro - Striker/Center Forward
  • Segundo Delantero - Second Striker
  • Extremo - Forward/Winger

Database Mapping

The Posicion entity is mapped to a database table with the same name. The Id property serves as the primary key and is auto-generated.The relationship with Jugador is established through a foreign key in the Jugador table pointing to the Posicion’s Id.
  • Jugador - Players assigned to this position
  • Equipo - Teams that have players in this position (indirect)
  • DirectorTecnico - Technical directors managing players (indirect)
  • Partido - Matches where players with this position participate (indirect)