public List <ClasificacionDeporte> listaClasificacionDeporte() { List <ClasificacionDeporte> lista = new List <ClasificacionDeporte>(); bd.consultarBD("select * from Deporte_Clasificacion"); while (bd.Lector.Read()) { ClasificacionDeporte tipo = new ClasificacionDeporte(); if (!bd.Lector.IsDBNull(0)) { tipo.Id = bd.Lector.GetInt32(0); } if (!bd.Lector.IsDBNull(1)) { tipo.Nombre = bd.Lector.GetString(1); } lista.Add(tipo); } bd.Lector.Close(); bd.desconectar(); return(lista); }
public Deporte() { id = 0; nombre = ""; clasificacion = new ClasificacionDeporte(); }
public Deporte(int id, string nombre, ClasificacionDeporte clasificacion) { this.id = id; this.nombre = nombre; this.clasificacion = clasificacion; }