public BE.Categoria ObtnerCategoriaPorIdReducido(int idCategoria) { BLL.Deporte bllDeporte = new BLL.Deporte(); BE.Categoria beCategoria = _dalManagerCategoria.ObtenerCategoriaPorId(idCategoria); //beCategoria.Deporte = bllDeporte.ObtnerDeportePorId(beCategoria.Deporte.Id); return(beCategoria); }
/// <summary> /// Obtiene todos los Categorias. /// </summary> /// <returns></returns> public List <BE.Categoria> ObtenerCategorias() { BLL.Deporte bllDeporte = new BLL.Deporte(); List <BE.Categoria> lstCategorias = _dalManagerCategoria.Leer(); foreach (BE.Categoria unCategoria in lstCategorias) { unCategoria.Deporte = bllDeporte.ObtnerDeportePorId(unCategoria.Deporte.Id); } return(lstCategorias); }
/// <summary> /// Obtiene todos los Nivels. /// </summary> /// <returns></returns> public List <BE.Nivel> ObtenerNiveles() { BLL.NivelRegla bllNivelRegla = new BLL.NivelRegla(); BLL.Deporte bllDeporte = new BLL.Deporte(); List <BE.Nivel> lstNivels = _dalManagerNivel.Leer(); //foreach (BE.Nivel beNivel in lstNivels) //{ // beNivel.Deporte = _bllDeporte.ObtnerDeportePorId(beNivel.Deporte.Id); // beNivel.ReglasDeNivel = _bllNivelRegla.ObtenerReglasPorNivelId(beNivel.Id); //} return(lstNivels); }
public BE.Nivel ObtnerNivelPorId(int idNivel) { if (idNivel != 0) { BLL.NivelRegla bllNivelRegla = new BLL.NivelRegla(); BLL.Deporte bllDeporte = new BLL.Deporte(); BE.Nivel beNivel = _dalManagerNivel.ObtenerNivelPorId(idNivel); beNivel.Deporte = bllDeporte.ObtnerDeportePorId(beNivel.Deporte.Id); beNivel.ReglasDeNivel = bllNivelRegla.ObtenerReglasPorNivelId(beNivel.Id); return(beNivel); } else { return(null); } }