Skip to main content

Overview

The CE_Canchas entity represents a sports court in the system. It contains information about the court’s name, type, pricing, and availability status.

Properties

Entity Definition

public class CE_Canchas
{
    public int IdCancha { get; set; }
    public string? Nombre { get; set; }
    public string? Tipo { get; set; }
    public decimal PrecioPorHora { get; set; }
    public string? Estado { get; set; }
}

CE_EstadosReservas

Represents the reservation status for courts.
public class CE_EstadosReservas
{
    public int IdEstado { get; set; }
    public bool Estado { get; set; }
}

ViewModels

CanchaViewModel

View model used for court management operations, combining a single court with a list of all available courts.
public class CanchaViewModel
{
    public CE_Canchas Canchas { get; set; }
    public List<CE_Canchas> ListaCanchas { get; set; }
}

Usage Example

// Creating a new court
var cancha = new CE_Canchas
{
    IdCancha = 1,
    Nombre = "Cancha Fútbol 1",
    Tipo = "Fútbol",
    PrecioPorHora = 50.00m,
    Estado = "Disponible"
};

// Using the ViewModel
var viewModel = new CanchaViewModel
{
    Canchas = cancha,
    ListaCanchas = new List<CE_Canchas>()
};

Build docs developers (and LLMs) love